Image processing apparatus and method

ABSTRACT

The present technique relates to an image processing apparatus and method that allow to suppress an increase in processing time. The image processing apparatus includes an information control unit that obtains information required for image processing for a focused pixel, using only information belonging to a slice including the focused pixel, the focused pixel being a processing target, and the information being obtained using reference information belonging to a different pixel than the focused pixel; and an image processing unit that performs the image processing using the information obtained by the information control unit. The present disclosure can be applied to image processing apparatuses.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation application of U.S. patentapplication Ser. No. 14/005,669, filed Sep. 17, 2013 which is a NationalStage of PCT/JP2012/056810, filed Mar. 16, 2012, and claims the benefitof priority from prior Japanese Patent Applications JP 2011-229574,filed Oct. 19, 2011 and JP 2011-066211, filed Mar. 24, 2011, the entirecontent of which are hereby incorporated by reference.

TECHNICAL FIELD

The present disclosure relates to an image processing apparatus andmethod, and more particularly to an image processing apparatus andmethod that allow to suppress an increase in processing time.

BACKGROUND ART

In recent years, an apparatus that complies with a scheme such as MPEG(Moving Picture Experts Group) where image information is handled indigital form and at that time for the purpose of efficient transmissionand accumulation of information, compression is performed by anorthogonal transform, such as a discrete cosine transform, and motioncompensation, utilizing the redundancy unique to the image informationhas started to proliferate for both information distribution onbroadcast stations, etc., and information reception in ordinaryhouseholds.

In particular, MPEG2 (ISO (International Organization forStandardization)/IEC (International Electrotechnical Commission)13818-2) is a standard defined as a general image coding scheme andcovering both interlaced images and progressive images and standarddefinition images and high definition images, and is currently widelyused in a wide range of applications for professional use and consumeruse. By using the MPEG2 compression scheme, for example, by allocating arate (bit rate) of 4 to 8 Mbps for a standard definition interlacedimage with 720.times.480 pixels, and a rate (bit rate) of 18 to 22 Mbpsfor a high definition interlaced image with 1920.times.1088 pixels, ahigh compression rate and excellent image quality can be achieved.

MPEG2 is mainly targeted for high image quality coding compatible forbroadcasting, but does not support a coding scheme with a lower rate(bit rate), i.e., a higher compression rate, than that of MPEG1. Due tothe proliferation of portable terminals, the needs for such a codingscheme are expected to increase in the future, and correspondingly anMPEG4 coding scheme is standardized. For an image coding scheme, thestandard thereof was approved as the International standard ISO/IEC14496-2 in December 1998.

Furthermore, in recent years, for the initial purpose of image codingfor videoconference, standardization of the standard called H.26L (ITU-T(International Telecommunication Union Telecommunication StandardizationSector) Q6/16 VCEG (Video Coding Expert Group)) has been pursued. It isknown that although H.26L requires a larger amount of computation forits coding and decoding compared to conventional coding schemes such asMPEG2 and MPEG4, higher coding efficiency is achieved. In addition, atpresent, as part of MPEG4 activities, standardization that achieveshigher coding efficiency by adopting, on the basis of this H.26L,functions not supported by H.26L is performed as Joint Model ofEnhanced-Compression Video Coding.

For the standardization schedule, the standard became an internationalstandard in March 2003 in the name of H.264 and MPEG-4 Part10 (AdvancedVideo Coding, hereinafter, referred to as AVC).

However, a macroblock size of 16 pixels.times.16 pixels may not beoptimum for a large picture frame, like UHD (Ultra High Definition; 4000pixels.times.2000 pixels) which may serve as a target for anext-generation coding scheme.

Hence, currently, for the purpose of further improving coding efficiencyover AVC, standardization of a coding scheme called HEVC (HighEfficiency Video Coding) is pursued by JCTVC (Joint CollaborationTeam—Video Coding) which is a joint standardization organization ofITU-T and ISO/IEC (see, for example, Non-Patent Document 1).

In the HEVC coding scheme, a Coding Unit (CU) is defined as a processingunit similar to a macroblock in AVC. The size of the CU is not fixed at16.times.16 pixels, like a macroblock in AVC, and is specified in imagecompression information in each sequence.

Meanwhile, for an Adaptive Loop Filter (ALF) used in such a codingscheme, the Wiener filter is applied for a reconstructed image to removenoise contained in the reconstructed image, enabling to improve codingefficiency and image quality.

As one of the techniques using ALF, there is proposed a method calledclass classification ALF where filter characteristics are switched usinginformation that can be classified into a class by a decoder, to allowthe filter characteristics to suit local conditions. For informationused for class classification, in information used for classclassification which is considered in the next-generation video codingstandard HEVC, there is the magnitude of SML (Sum-Modified Laplacian)which is an operator for obtaining the complexity of texture. SML iscalculated using the differences between a focused pixel and neighboringpixels.

In addition, HEVC adopts a method called an adaptive offset filter whichis proposed in Non-Patent Document 2. In HEVC, the adaptive offsetfilter is provided between a deblocking filter and an adaptive loopfilter.

For the kinds of adaptive offset, there are of two kinds called bandoffset and six kinds called edge offset, and furthermore, it is alsopossible not to adapt offset. Then, an image is partitioned into aquad-tree, and a selection can be made for each region as to which oneof the above-described kinds of adaptive offset is to be used forcoding. By using this method, coding efficiency can be improved.

In such edge offset of the adaptive offset filter, neighboring pixelvalues are referred to for calculation of an offset value for a focusedpixel.

Meanwhile, in the above-described image coding schemes such as AVC andHEVC, for example, a method is prepared in which in order to parallelizeprocesses, a picture is divided into a plurality of slices and a processis performed on a slice-by-slice basis.

CITATION LIST Non-Patent Documents

-   Non-Patent Document 1: “Test Model under Consideration”, JCTVC-B205,    Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3    and ISO/IEC JTC1/SC29/WG112nd Meeting: Geneva, CH, 21-28 Jul. 2010    Non-Patent Document 2: “CE8 Subtest 3: Picture Quality Adaptive    Offset”, JCTVC-D122, January 2011

SUMMARY OF THE INVENTION Problems to be Solved by the Invention

However, when information used for ALF class classification (e.g., apixel value of a reconstructed image) is present in a different slicethan a focused slice which is a processing target, since informationrequired for a filter process for the focused pixel which is theprocessing target is present in another slice (not present in thefocused slice), unless the process for that slice has been completed,the process for the focused pixel cannot start.

In addition, likewise, in an adaptive offset filter process, when aneighboring pixel to be referred to is present in a different slice thana focused slice, an offset value for a focused pixel for edge offsetcannot be calculated until the process for the slice in which theneighboring pixel is present has been completed.

That is, for example, when a focused pixel is present at an edge of afocused slice and a neighboring pixel to be referred to is located inanother slice (neighboring slice), the process for the focused pixel (orthe entire focused slice) cannot start until the process for theneighboring slice has been completed. In such a case, since theneighboring slice and the focused slice cannot be processed in parallel,the processing time increases, which may cause a reduction inthroughput.

The present disclosure is made in view of such circumstances, and anobject of the present disclosure is to allow to suppress an increase inprocessing time even when a focused pixel is processed by referring toneighboring pixels in image coding where a picture is divided into aplurality of slices and processes are performed in parallel on aslice-by-slice basis.

An image processing apparatus according to one aspect of the presentdisclosure includes: an information control unit that obtainsinformation required for image processing for a focused pixel, usingonly information belonging to a slice including the focused pixel, thefocused pixel being a processing target, and the information beingobtained using reference information belonging to a different pixel thanthe focused pixel; and an image processing unit that performs the imageprocessing using the information obtained by the information controlunit.

The image processing is an adaptive loop filter process, the informationcontrol unit determines, as the information required for the imageprocessing, a filter coefficient used in the adaptive loop filterprocess, and the image processing unit performs the adaptive loop filterprocess for the focused pixel, using the filter coefficient determinedby the information control unit.

The image processing unit performs the adaptive loop filter processindependently on a slice-by-slice basis, and the information controlunit determines the filter coefficient without using informationexternal to a focused slice being a processing target.

The information control unit includes: a position determination unitthat determines whether a neighboring pixel of the focused pixel islocated in the focused slice; a calculation unit that calculatesinformation representing complexity of texture of the focused pixel,according to a result of the determination made by the positiondetermination unit; a class classification unit that classifies thefocused pixel into a class, according to magnitude of the informationrepresenting complexity of texture calculated by the calculation unit;and a filter coefficient setting unit that sets a value according to theclass classified by the class classification unit, as the filtercoefficient for the focused pixel.

The information representing complexity of texture is SML (Sum-ModifiedLaplacian).

When it is determined by the position determination unit that theneighboring pixel is not located in the focused slice, the calculationunit sets a predetermined, specified, fixed value as a pixel value ofthe neighboring pixel, and calculates the information representingcomplexity of texture.

When it is determined by the position determination unit that theneighboring pixel is not located in the focused slice, the calculationunit calculates the information representing complexity of texture,using a pixel value of the available pixel near the neighboring pixelinstead of a pixel value of the neighboring pixel.

When it is determined by the position determination unit that theneighboring pixel is not located in the focused slice, the calculationunit calculates the information representing complexity of texture,using a pixel value of the focused pixel instead of a pixel value of theneighboring pixel.

The calculation unit calculates the information representing complexityof texture using, as neighboring pixels, four pixels adjacent above,below, and to left and right of the focused pixel.

The calculation unit sets, as the information representing complexity oftexture, a sum total of absolute values of differences between a pixelvalue of the focused pixel and pixel values of the respectiveneighboring pixels.

When it is determined by the position determination unit that theneighboring pixel is not located in the focused slice, the filtercoefficient setting unit sets a predetermined, specified value as thefilter coefficient for the focused pixel.

When it is determined by the position determination unit that theneighboring pixel is not located in the focused slice, the imageprocessing unit omits the adaptive loop filter process for the focusedpixel.

The image processing further includes a flag generation unit thatgenerates a flag indicating whether to perform an adaptive loop filterprocess for the focused slice independently of other slices, wherein theimage processing unit performs the adaptive loop filter process for thefocused pixel in the focused slice, according to a value of the flaggenerated by the flag generation unit.

The image processing is an adaptive offset process, and the informationcontrol unit determines, as the information required for imageprocessing, a neighboring pixel value used in the adaptive offsetprocess, and the image processing unit performs the adaptive offsetprocess for the focused pixel, using the neighboring pixel valuedetermined by the information control unit.

The information control unit includes: a position determination unitthat determines whether a neighboring pixel of the focused pixel islocated in the focused slice; and a neighboring pixel valuedetermination unit that determines the neighboring pixel value,according to a result of the determination made by the positiondetermination unit.

When it is determined by the position determination unit that theneighboring pixel is not located in the focused slice, the neighboringpixel value determination unit determines a predetermined, specified,fixed value to be the neighboring pixel value.

When it is determined by the position determination unit that theneighboring pixel is not located in the focused slice, the neighboringpixel value determination unit determines a pixel value of an availablepixel near the neighboring pixel to be the neighboring pixel value.

When it is determined by the position determination unit that theneighboring pixel is not located in the focused slice, the neighboringpixel value determination unit determines a pixel value of the focusedpixel to be the neighboring pixel value.

The image processing apparatus further includes a flag generation unitthat generates a flag indicating whether to perform an adaptive offsetprocess for the focused slice independently of other slices, wherein theimage processing unit performs the adaptive offset process for thefocused pixel in the focused slice, according to a value of the flaggenerated by the flag generation unit.

An image processing method for an image processing apparatus accordingto one aspect of the present technique includes: obtaining, by aninformation control unit, information required for image processing fora focused pixel, using only information belonging to a slice includingthe focused pixel, the focused pixel being a processing target, and theinformation being obtained using reference information belonging to adifferent pixel than the focused pixel; and performing, by an imageprocessing unit, the image processing using the information obtained bythe information control unit.

Solutions to Problems

In one aspect of the present disclosure, information required for imageprocessing for a focused pixel being a processing target, and obtainedusing reference information belonging to a different pixel than thefocused pixel, is obtained using only information belonging to a sliceincluding the focused pixel, and the image processing is performed usingthe obtained information.

Effects of the Invention

According to the present disclosure, images can be processed. Inparticular, an increase in processing time can be suppressed.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram showing an exemplary main configuration of animage coding apparatus.

FIGS. 2A and 2B are diagrams describing multislice.

FIG. 3 is a diagram describing a coding unit

FIG. 4 is a diagram describing the relationship between a slice and acoding unit.

FIG. 5 is a diagram describing the relationship between a slice and acoding unit.

FIG. 6 is a diagram describing class classification ALF.

FIG. 7 is a diagram showing an example of the positions of a focusedregion and neighboring regions for class classification ALF inmultislice.

FIG. 8 is a diagram showing another example of the positions of afocused region and neighboring regions for class classification ALF inmultislice.

FIG. 9 is a diagram showing still another example of the positions of afocused region and neighboring regions for class classification ALF inmultislice.

FIG. 10 is a diagram showing yet another example of the positions of afocused region and neighboring regions for class classification ALF inmultislice.

FIG. 11 is a block diagram showing an exemplary main configuration of anadaptive loop filter and a filter coefficient control unit.

FIG. 12 is a flowchart describing an example of the flow of a codingprocess.

FIG. 13 is a flowchart describing an example of the flow of an adaptiveloop filter process.

FIG. 14 is a flowchart describing an example of the flow of an SMLcalculation process.

FIG. 15 is a block diagram showing an exemplary main configuration of animage decoding apparatus.

FIG. 16 is a block diagram showing an exemplary main configuration of anadaptive loop filter and a filter coefficient control unit.

FIG. 17 is a flowchart describing an example of the flow of a decodingprocess.

FIG. 18 is a flowchart describing an example of the flow of an adaptiveloop filter process.

FIG. 19 is a diagram describing a quad-tree structure.

FIGS. 20A, 20B, 20C, 20D, 20E, and 20F are diagrams describing edgeoffset.

FIGS. 21A and 21B are diagrams showing classification rules for edgeoffset.

FIG. 22 is a block diagram showing another exemplary configuration of animage coding apparatus.

FIG. 23 is a block diagram showing an exemplary main configuration of anadaptive offset unit.

FIG. 24 is a block diagram showing an exemplary main configuration of anedge offset computing unit and a neighboring pixel value control unit.

FIG. 25 is a flowchart describing another example of the flow of acoding process.

FIG. 26 is a flowchart describing an example of the flow of an adaptiveoffset process.

FIG. 27 is a flowchart describing an example of the flow of an edgeoffset process.

FIG. 28 is a block diagram showing another exemplary configuration of animage decoding apparatus.

FIG. 29 is a block diagram showing an exemplary main configuration of anadaptive offset unit.

FIG. 30 is a flowchart describing another example of the flow of adecoding process.

FIG. 31 is a flowchart describing an example of the flow of an adaptiveoffset process.

FIG. 32 is a block diagram showing an exemplary main configuration of apersonal computer.

FIG. 33 is a block diagram showing an example of a schematicconfiguration of a television apparatus.

FIG. 34 is a block diagram showing an example of a schematicconfiguration of a mobile phone.

FIG. 35 is a block diagram showing an example of a schematicconfiguration of a recording/reproducing apparatus.

FIG. 36 is a block diagram showing an example of a schematicconfiguration of an imaging apparatus.

MODE FOR CARRYING OUT THE INVENTION

Modes for carrying out the present technique (hereinafter, referred toas embodiments) will be described below. Note that the description ismade in the following order:

1. First embodiment (image coding apparatus)2. Second embodiment (image decoding apparatus)3. Third embodiment (image coding apparatus)4. Fourth embodiment (image decoding apparatus)5. Fifth embodiment (personal computer)6. Sixth embodiment (television receiver)7. Seventh embodiment (mobile phone)8. Eighth embodiment (recording/reproducing apparatus)9. Ninth embodiment (imaging apparatus)

1. FIRST EMBODIMENT [Image Coding Apparatus]

FIG. 1 is a block diagram showing an exemplary main configuration of animage coding apparatus.

An image coding apparatus 100 shown in FIG. 1 codes image data using aprediction process like an H.264 and MPEG (Moving Picture Experts Group)4 Part10 (AVC (Advanced Video Coding)) coding scheme.

As shown in FIG. 1, the image coding apparatus 100 has an A/D conversionunit 101, a screen rearrangement buffer 102, a computing unit 103, anorthogonal transform unit 104, a quantization unit 105, a losslesscoding unit 106, and an accumulation buffer 107. In addition, the imagecoding apparatus 100 has an inverse quantization unit 108, an inverseorthogonal transform unit 109, a computing unit 110, a deblocking filter111, an adaptive loop filter 112, a frame memory 113, a selection unit114, an intra-prediction unit 115, a motion prediction/compensation unit116, a predicted image selection unit 117, and a rate control unit 118.

The image coding apparatus 100 further has a filter coefficient controlunit 121.

The A/D conversion unit 101 A/D converts inputted image data andsupplies the converted image data (digital data) to the screenrearrangement buffer 102 to store the data. The screen rearrangementbuffer 102 rearranges stored images of frames in display order, in frameorder for coding according to a GOP (Group Of Picture), and supplies theimages whose frame order has been rearranged to the computing unit 103.In addition, the screen rearrangement buffer 102 also supplies theimages whose frame order has been rearranged to the intra-predictionunit 115 and the motion prediction/compensation unit 116.

The computing unit 103 subtracts a predicted image supplied from theintra-prediction unit 115 or the motion prediction/compensation unit 116through the predicted image selection unit 117, from an image read fromthe screen rearrangement buffer 102 and outputs difference informationthereabout to the orthogonal transform unit 104.

For example, in the case of an image to be subjected to inter-coding,the computing unit 103 subtracts a predicted image supplied from themotion prediction/compensation unit 116, from an image read from thescreen rearrangement buffer 102.

The orthogonal transform unit 104 performs an orthogonal transform, suchas a discrete cosine transform or a Karhunen-Loeve transform, on thedifference information supplied from the computing unit 103. Note thatthe orthogonal transform method may be any method. The orthogonaltransform unit 104 supplies a transform coefficient obtained by theorthogonal transform to the quantization unit 105.

The quantization unit 105 quantizes the transform coefficient suppliedfrom the orthogonal transform unit 104. The quantization unit 105 sets aquantization parameter based on information about a target value forrate supplied from the rate control unit 118, and performs thequantization. Note that the quantization method may be any method. Thequantization unit 105 supplies the quantized transform coefficient tothe lossless coding unit 106.

The lossless coding unit 106 codes, by any coding scheme, the transformcoefficient quantized by the quantization unit 105. Since coefficientdata is quantized under the control of the rate control unit 118, therate is the target value set by the rate control unit 118 (or close tothe target value).

In addition, the lossless coding unit 106 obtains information indicatingintra-prediction mode, etc., from the intra-prediction unit 115 andobtains information indicating inter-prediction mode, motion vectorinformation, etc., from the motion prediction/compensation unit 116. Thelossless coding unit 106 further obtains alf_flag, etc., supplied fromthe adaptive loop filter 112.

The lossless coding unit 106 codes those various types of information byany coding scheme, and includes the coded information as a part ofheader information of coded data (multiplexing). The lossless codingunit 106 supplies coded data obtained by the coding to the accumulationbuffer 107 to accumulate the coded data.

The coding scheme for the lossless coding unit 106 includes, forexample, variable-length coding, arithmetic coding, or the like.Variable-length coding includes, for example, CAVLC (Context-AdaptiveVariable Length Coding) defined by the H.264/AVC scheme, etc. Arithmeticcoding includes, for example, CABAC (Context-Adaptive Binary ArithmeticCoding), etc.

The accumulation buffer 107 temporarily holds the coded data suppliedfrom the lossless coding unit 106. The accumulation buffer 107 outputs,at specified timing, the held coded data to, for example, a recodingapparatus (recording medium), a transmission line, etc., provided at asubsequent stage which are not shown.

In addition, the transform coefficient quantized by the quantizationunit 105 is also supplied to the inverse quantization unit 108. Theinverse quantization unit 108 inverse quantizes the quantized transformcoefficient by a method appropriate to the quantization performed by thequantization unit 105. The inverse quantization method may be any methodas long as the method is appropriate to the quantization processperformed by the quantization unit 105. The inverse quantization unit108 supplies the obtained transform coefficient to the inverseorthogonal transform unit 109.

The inverse orthogonal transform unit 109 performs an inverse orthogonaltransform on the transform coefficient supplied from the inversequantization unit 108, by a method appropriate to the orthogonaltransform process performed by the orthogonal transform unit 104. Theinverse orthogonal transform method may be any method as long as themethod is appropriate to the orthogonal transform process performed bythe orthogonal transform unit 104. An inverse orthogonal transformedoutput (reconstructed difference information) is supplied to thecomputing unit 110.

The computing unit 110 adds a predicted image supplied from theintra-prediction unit 115 or the motion prediction/compensation unit 116through the predicted image selection unit 117, to the inverseorthogonal transform result, i.e., the reconstructed differenceinformation, supplied from the inverse orthogonal transform unit 109,and thereby obtains a locally decoded image (decoded image). The decodedimage is supplied to the deblocking filter 111 or the frame memory 113.

The deblocking filter 111 performs a deblocking filter process on thedecoded image and thereby removes blockiness in the decoded image. Thedeblocking filter 111 supplies the filter-processed decoded image to theadaptive loop filter 112.

The adaptive loop filter 112 performs, using the Wiener Filter, a loopfilter process on the deblocking filter processing result (the decodedimage having been subjected to the removal of blockiness), and therebyimproves image quality. The adaptive loop filter 112 performs classclassification ALF where a focused pixel which is a processing target isclassified into a class, and a filter process for the focused pixel isperformed using a filter coefficient obtained according to the class.Note that the adaptive loop filter 112 performs this filter process on aslice-by-slice basis.

The adaptive loop filter 112 supplies the filter processing result (thefilter-processed decoded image) to the frame memory 113. Note that, asdescribed above, the decoded image outputted from the computing unit 110can be supplied to the frame memory 113 without passing through thedeblocking filter 111 and the adaptive loop filter 112. For example, asa reference image used for an intra-prediction, an image whose filterprocesses by the deblocking filter 111 and the adaptive loop filter 112are omitted is stored in the frame memory 113.

The frame memory 113 stores the supplied decoded image and supplies, asa reference image, the stored decoded image to the selection unit 114 atspecified timing.

The selection unit 114 selects a supply destination of the referenceimage supplied from the frame memory 113. For example, in the case of anintra-prediction, the selection unit 114 supplies the reference imagesupplied from the frame memory 113, to the intra-prediction unit 115. Inaddition, for example, in the case of an inter-prediction, the selectionunit 114 supplies the reference image supplied from the frame memory113, to the motion prediction/compensation unit 116.

The intra-prediction unit 115 performs an intra-prediction (intra-screenprediction) using an input image supplied from the screen rearrangementbuffer 102 and the reference image supplied from the frame memory 113through the selection unit 114, and basically using a PU as a processingunit. When the intra-prediction unit 115 selects an optimumintra-prediction mode, the intra-prediction unit 115 supplies apredicted image created in the optimum mode to the predicted imageselection unit 117. In addition, as described above, theintra-prediction unit 115 supplies, where appropriate, intra-predictionmode information indicating the adopted intra-prediction mode, etc., tothe lossless coding unit 106 to code the information.

The motion prediction/compensation unit 116 performs a motion prediction(inter-prediction) using an input image supplied from the screenrearrangement buffer 102 and the reference image supplied from the framememory 113 through the selection unit 114, and basically using a PU as aprocessing unit, and performs a motion compensation process according toa detected motion vector, and thereby creates a predicted image(inter-predicted image information). The motion prediction/compensationunit 116 performs such an inter-prediction in a plurality of modes(inter-prediction modes) prepared in advance.

The motion prediction/compensation unit 116 creates predicted images inall candidate inter-prediction modes, and evaluates cost function valuesfor the respective predicted images to select an optimum mode. When themotion prediction/compensation unit 116 selects an optimuminter-prediction mode, the motion prediction/compensation unit 116supplies the predicted image created in the optimum mode to thepredicted image selection unit 117.

In addition, the motion prediction/compensation unit 116 suppliesinformation indicating the adopted inter-prediction mode, informationrequired to perform a process in the adopted inter-prediction mode whendecoding coded data, etc., to the lossless coding unit 106 to code thosepieces of information.

The predicted image selection unit 117 selects a supply source (theintra-prediction unit 115 or the motion prediction/compensation unit116) of a predicted image to be supplied to the computing unit 103 andthe computing unit 110, and supplies the predicted image supplied fromthe selected processing unit, to the computing unit 103 and thecomputing unit 110.

The rate control unit 118 controls the rate of the quantizationoperation of the quantization unit 105 based on the rate of the codeddata accumulated in the accumulation buffer 107, so as to prevent theoccurrence of overflows or underflows.

The filter coefficient control unit 121 sets a filter coefficient for afilter process performed by the adaptive loop filter 112. The filtercoefficient control unit 121 classifies a focused pixel which is aprocessing target into a class, and sets a filter coefficient accordingto the class. The filter coefficient control unit 121 performs thisfilter coefficient setting (class classification) without usinginformation in other slices than a focused slice to which the focusedpixel which is the processing target belongs. That is, the filtercoefficient control unit 121 secures the independence of slice-by-sliceprocesses upon setting a filter coefficient.

[Multislice]

In image coding schemes such as MPEG2 and AVC, one picture is dividedinto a plurality of slices, and the slices can be processed in parallel(multislice).

In the case of MPEG2, as shown in the example in FIG. 2A, the maximumslice size is one macroblock line, and all of the slices composing aB-picture need to be B-slices.

On the other hand, in the case of AVC, as shown in the example in FIG.2B, a slice may be larger than one macroblock line, and a slice boundarydoes not need to be at the right edge of a macroblock line (the rightedge of a screen), and a single picture may be composed of differenttypes of slices.

In the case of AVC, a deblocking filter process can be performed acrossslice boundaries. Note, however, that processes using adjacentinformation, such as an adaptive loop filter process, anintra-prediction, CABAC, CAVLC, and a motion vector prediction, cannotbe performed across slice boundaries.

In other words, since coding processes for the respective slices can beperformed independently of each other, one picture is divided into aplurality of slices, and the slices can be coded in parallel. That is,by such a slice division, a reduction in coding processing time (anincrease in the speed of a coding process) can be achieved.

[Coding Unit]

Meanwhile, in the AVC coding scheme, a macroblock or a sub-macroblockwhich is one of a plurality of sub-macroblocks into which the macroblockis divided is used as a processing unit for a prediction process, acoding process, etc. However, a macroblock size of 16 pixels.times.16pixels is not optimum for a large picture frame, like UHD (Ultra HighDefinition; 4000 pixels.times.2000 pixels) which may serve as a targetfor a next-generation coding scheme.

Hence, currently, for the purpose of further improving coding efficiencyover AVC, standardization of a coding scheme called HEVC (HighEfficiency Video Coding) is pursued by JCTVC (Joint CollaborationTeam-Video Coding) which is a joint standardization organization ofITU-T (International Telecommunication Union TelecommunicationStandardization Sector) and ISO (International Organization forStandardization)/IEC (International Electrotechnical Commission).

While in AVC a hierarchical structure including macroblocks andsub-macroblocks is defined, in HEVC, as shown in FIG. 3, a Coding Unit(CU) is defined.

A CU is also called a Coding Tree Block (CTB) and is a partial region ofan image in picture units, which plays the same role as a macroblock inAVC. While the latter is fixed at a 16.times.16 pixel size, the size ofthe former is not fixed and thus is specified in image compressioninformation in each sequence.

For example, in a Sequence Parameter Set (SPS) included in coded datawhich serves as an output, the largest CU size (LCU (Largest CodingUnit)) and the smallest CU size ((SCU (Smallest Coding Unit)) aredefined.

In each LCU, by setting split-flag to 1 within a range that does notfall below the size of the SCU, the LCU can be split into CUs with asmaller size. In the example of FIG. 3, the size of the LCU is 128 andthe maximum hierarchical depth is 5. When the value of split_flag is“1”, a CU with a size of 2N.times.2N is split into CUs with a size ofN.times.N which is one lower level.

Furthermore, a CU is split into Prediction Units (PUs) which are regionsserving as processing units for an intra- or inter-prediction (partialregions of an image in picture units), and is split into Transform Units(TUs) which are regions serving as processing units for an orthogonaltransform (partial regions of an image in picture units). At present, inHEVC, in addition to 4.times.4 and 8.times.8, 16.times.16 and32.times.32 orthogonal transforms can be used.

In the case of a coding scheme where a CU is defined and various typesof processes are performed using the CU as a unit, like theabove-described HEVC, it can be considered that a macroblock in AVCcorresponds to an LCU. Note, however, that since the CU has ahierarchical structure as shown in FIG. 3, it is common that the size ofthe LCU at the highest level is set to be larger than the macroblock inAVC, e.g., 128.times.128 pixels.

The present disclosure can also be applied to a coding scheme that usessuch CUs, PUs, TUs, and the like, instead of macroblocks. Namely, theprocessing unit used for a prediction process may be any region. Thatis, in the following, a processing target region (also referred to asthe region or focused region) for a prediction process and neighboringregions which are regions located in the neighborhood of the focusedregion include not only such macroblocks and sub-macroblocks, but alsoCUs, PUs, TUs, and the like.

LCUs (CUs, PUs, and TUs) such as those described above are a pluralityof regions into which a slice region is divided, and belong to a lowerlayer of the slice. That is, in the case of multislice such as thatdescribed in FIGS. 2A and 2B, as shown in FIG. 4, an LCU is included inany of the slices.

As shown in FIG. 5, the starting address of an LCU is specified by arelative position from the start of each slice. For each region (CU, PU,and TU) in the LCU, identification information and size are specified.That is, the position of each pixel can be identified from those piecesof information. Therefore, the positions of a focused pixel which is aprocessing target and its neighboring pixels and the range of a focusedslice can be easily identified from those pieces of information. Inother words, whether the neighboring pixels belong to the focused slice(whether available or unavailable) can be easily identified.

[Computation of a Filter Coefficient]

The filter coefficient control unit 121 determines, using only availableinformation, a filter coefficient which is used in an adaptive loopfilter process for a focused pixel. More specifically, the filtercoefficient control unit 121 classifies the focused pixel into a classand sets a value according to the classified class, as a filtercoefficient for the focused pixel. For the class classification, thefilter coefficient control unit 121 calculates SML (Sum-ModifiedLaplacian). The SML is an operator for obtaining the complexity oftexture. That is, the filter coefficient control unit 121 classifies thefocused pixel into a class, according to the magnitude of the SML.

The filter coefficient control unit 121 calculates the SML using onlyavailable information. For example, the filter coefficient control unit121 performs calculation using the pixel value of a focused pixel andthe pixel values of available neighboring pixels located in theneighborhood of the focused pixel. The neighboring pixels may be anypixel as long as the pixel is available, but basically those pixelscloser in position to the focused pixel have higher correlation and thusare desirable.

For example, as shown in FIG. 6, the filter coefficient control unit 121calculates the SML (i, j) of a focused pixel (i, j) as shown in thefollowing equation (1), using the pixel value R (i, j) of the focusedpixel, the pixel value R(i−1, j) of a neighboring pixel adjacent to theleft of the focused pixel, the pixel value R (i+1, j) of a neighboringpixel adjacent to the right of the focused pixel, the pixel value R (i,j−1) of a neighboring pixel adjacent above the focused pixel, and thepixel value R (i, j+1) of a neighboring pixel adjacent below the focusedpixel. Note that the pixel value of the pixel in the position (i, j) isR (i, j).

SML(i,j)=|2.times.R(i,j)−R(i−1,j)−R(i+1,j)|+|2.times.R(i,j)−R(i,j−1)−R(i−,j+1)|  (1)

The filter coefficient control unit 121 classifies the focused pixelinto a class based on the magnitude of the SML (i, j), and sets a valueaccording to the class as a filter coefficient for the focused pixel.

[Class Classification ALF for Multislice]

As described above, in class classification ALF, upon classclassification of a focused pixel, the pixel values of neighboringpixels are referred to. However, in the case of multislice such as thatdescribed above, there is a possibility that a neighboring pixel whichmay be referred to may be located in a different slice than a slicewhere the focused pixel is present.

FIGS. 7 to 10 show examples of the positional relationship betweenmultislice and a focused region and neighboring regions in classclassification ALF.

FIG. 7 shows a state in which a focused pixel (i, j) and neighboringpixels adjacent above, below, and to the left and right of the focusedpixel are all located in one slice (slice 1) (belong to a focusedslice). Note that i represents the position in the horizontal directionof the pixel, and j represents the position in the vertical direction ofthe pixel. In addition, the upper left edge of the slice is the origin(0, 0).

In this case, in class classification of the focused pixel (SMLcalculation), the filter coefficient control unit 121 can refer to thepixel values of all neighboring pixels (available).

FIG. 8 shows a state in which although a focused pixel (i, j), aneighboring pixel (i, j+1) adjacent below the focused pixel, aneighboring pixel (i−1, j) adjacent to the left of the focused pixel,and a neighboring pixel (i+1, j) adjacent to the right of the focusedpixel are located in slice 1 (belong to a focused slice), a neighboringpixel (i, j−1) adjacent above the focused pixel is located in slice 0(not belong to the focused slice).

In this case, the filter coefficient control unit 121 can refer to theneighboring pixel (i, j+1), the neighboring pixel (i−1, j), and theneighboring pixel (i+1, j) (available), but cannot refer to theneighboring pixel (i, j−1) (unavailable).

FIG. 9 shows a state in which although a focused pixel (i, j), aneighboring pixel (i, j−1) adjacent above the focused pixel, aneighboring pixel (i−1, j) adjacent to the left of the focused pixel,and a neighboring pixel (i+1, j) adjacent to the right of the focusedpixel are located in slice 1 (belong to a focused slice), a neighboringpixel (i, j+1) adjacent below the focused pixel is located outside apicture or a frame (not present).

In this case, the filter coefficient control unit 121 can refer to theneighboring pixel (i, j−1), the neighboring pixel (i−1, j), and theneighboring pixel (i+1, j) (available), but cannot refer to theneighboring pixel (i, j+1) (unavailable).

FIG. 10 shows a state in which although a focused pixel (i, j), aneighboring pixel (i, j−1) adjacent above the focused pixel, aneighboring pixel (i, j+1) adjacent below the focused pixel, and aneighboring pixel (i+1, j) adjacent to the right of the focused pixelare located in slice 1 (belong to a focused slice), a neighboring pixel(i−1, j) adjacent to the left of the focused pixel is located in slice 0(not belong to the focused slice).

In this case, the filter coefficient control unit 121 can refer to theneighboring pixel (i, j−1), the neighboring pixel (i, j+1), and theneighboring pixel (i+1, j) (available), but cannot refer to theneighboring pixel (i−1, j) (unavailable).

Note that as shown in FIG. 9 slice boundaries not only include aboundary between slices, but also include a picture edge. The importantthing is that whether the pixel values of neighboring pixels areavailable, i.e., whether neighboring pixels are included in a focusedslice. Therefore, the state of the pixel value of a neighboring pixelbeing unavailable not only includes the case in which the neighboringpixel belongs to another slice, but also includes the case in which theneighboring pixel is not present (located outside the picture).

Note that the case is also considered in which a plurality ofneighboring pixels are not included in a focused slice, e.g., aneighboring pixel (i, j−1) and a neighboring pixel (i−1, j) areunavailable. That is, the positional relationship between a sliceboundary and a focused pixel is not limited to the examples shown inFIGS. 7 to 10.

When, as shown in FIGS. 8 to 10, the pixel value of at least one of theneighboring pixels is unavailable, the filter coefficient control unit121 calculates the SML of the focused pixel without using that pixelvalue.

The SML is an operator for obtaining the complexity of texture, andthus, can also be said to be a parameter indicating the strength of thepixel-value correlation of a focused region with neighboring pixels.Hence, the filter coefficient control unit 121 may calculate SML using,instead of the pixel value of an unavailable neighboring pixel, forexample, the pixel value of an available pixel located near theneighboring pixel (including a pixel adjacent to the neighboring pixel),utilizing the pixel-value correlation between pixels. Furthermore, asthe pixel near the neighboring pixel, the filter coefficient controlunit 121 may use, for example, the pixel value of a focused pixel tocalculate SML.

Furthermore, for example, to facilitate computation, the filtercoefficient control unit 121 may calculate SML using a specified, fixedvalue instead of the pixel value of an unavailable neighboring pixel.

Of course, other methods may be used. For example, the filtercoefficient control unit 121 may calculate, by specified computation, avalue used instead of the pixel value of an unavailable neighboringpixel, using the pixel value(s) of one or a plurality of other availablepixels, and calculate SML using the value.

By doing so, the filter coefficient control unit 121 can performcalculation of the SML of each pixel, i.e., class classification andcalculation of a filter coefficient, without referring to information inother slices. That is, the filter coefficient control unit 121 canperform those processes independently on a slice-by-slice basis.Therefore, the adaptive loop filter 112 can perform an adaptive loopfilter process independently on a slice-by-slice basis. Even in the caseof multislice, the adaptive loop filter 112 can suppress a reduction inthe throughput of an adaptive loop filter process. That is, the imagecoding apparatus 100 can suppress an increase in the processing time ofa coding process.

[Adaptive Loop Filter and Filter Coefficient Control Unit]

FIG. 11 is a block diagram showing an exemplary main configuration ofthe adaptive loop filter 112 and the filter coefficient control unit121.

As shown in FIG. 11, the adaptive loop filter 112 has a control unit 131and a filter processing unit 132.

In addition, the filter coefficient control unit 121 has a positiondetermination unit 141, an SML calculation unit 142, a classclassification unit 143, and a filter coefficient setting unit 144.

The control unit 131 controls an adaptive loop filter process of thefilter processing unit 132, based on the value of the flag alf_flagindicating whether to perform an adaptive loop filter process. Inaddition, upon performing an adaptive loop filter process, the controlunit 131 instructs the position determination unit 141 in the filtercoefficient control unit 121 to start the process. The control unit 131further supplies alf_flag to the lossless coding unit 106 to codealf_flag and transmit the coded alf_flag to the decoding side.

The filter processing unit 132 performs, according to control by thecontrol unit 131, a filter process for a pixel value having beensubjected to a deblocking filter process and supplied from thedeblocking filter 111, using a filter coefficient supplied from thefilter coefficient setting unit 144. The filter processing unit 132holds the filter-processed pixel value, and supplies the pixel value tothe frame memory 113 to store the pixel value as a reference image. Theheld pixel value is reused as the pixel value of a neighboring pixel inprocesses for other pixels which are processed later than a focusedpixel.

The position determination unit 141 obtains, according to control by thecontrol unit 131, address information indicating the positions ofslices, a focused pixel which is a processing target, and the like, fromthe lossless coding unit 106. Those pieces of address information arestored in, for example, a Sequence Parameter Set (SPS), a PictureParameter Set (PPS), a slice header, or the like, which is generated bythe lossless coding unit 106. The position determination unit 141determines the position of the focused pixel in a focused slice, usingthe obtained address information.

The SML calculation unit 142 calculates the SML of the focused pixelbased on the position determination result (positional information)obtained by the position determination unit 141, and using the pixelvalue of the focused pixel and the pixel values of neighboring pixelswhich are obtained from the filter processing unit 132 (withoutreferring to information in other slices than the focused slice).

The class classification unit 143 classifies the focused pixel into aclass, using the SML calculated by the SML calculation unit 142.

According to class information (class classification result) obtainedfrom the class classification unit 143, the filter coefficient settingunit 144 sets, for the focused pixel, a filter coefficient according tothe class. The filter coefficient setting unit 144 supplies the setfilter coefficient to the filter processing unit 132. The filterprocessing unit 132 performs a filter process for the focused pixel,using the filter coefficient.

[Flow of a Coding Process]

Next, the flow of processes performed by the image coding apparatus 100such as that described above will be described. First, with reference toa flowchart of FIG. 12, an example of the flow of a coding process willbe described. Note that the processes at the respective steps shown inFIG. 12 are performed in their respective processing units. Therefore,the processing units of the respective processes are not necessarilyequal to one another. Thus, although each data is processed by aprocedure such as that described below, in practice the processing orderof the processes at the respective steps is not always the one such asthat described below.

At step S101, the A/D conversion unit 101 A/D converts an inputtedimage. At step S102, the screen rearrangement buffer 102 stores A/Dconverted images and rearranges the order of pictures from display orderto coding order.

At step S103, the intra-prediction unit 115 performs an intra-predictionprocess in intra-prediction mode. At step S104, the motionprediction/compensation unit 116 performs an inter-motion predictionprocess where a motion prediction and motion compensation are performedin inter-prediction mode.

At step S105, the predicted image selection unit 117 determines anoptimum mode based on cost function values outputted from theintra-prediction unit 115 and the motion prediction/compensation unit116. That is, the predicted image selection unit 117 selects either oneof a predicted image created by the intra-prediction unit 115 and apredicted image created by the motion prediction/compensation unit 116.

At step S106, the computing unit 103 computes a difference between animage rearranged in the process at step S102 and the predicted imageselected in the process at step S105. Difference data is reduced in datasize compared to the original image data. Therefore, compared to thecase of coding an image as it is, the data size can be compressed.

At step S107, the orthogonal transform unit 104 performs an orthogonaltransform on the difference information generated in the process at stepS106. Specifically, an orthogonal transform such as a discrete cosinetransform or a Karhunen-Loeve transform is performed, and a transformcoefficient is outputted.

At step S108, the quantization unit 105 quantizes the orthogonaltransform coefficient obtained in the process at step S107.

The difference information quantized in the process at step S108 islocally decoded in the following manner. Specifically, at step S109, theinverse quantization unit 108 inverse quantizes the orthogonal transformcoefficient generated and quantized in the process at step S108 (alsoreferred to as the quantized coefficient), by a characteristicassociated with the characteristic of the quantization unit 105. At stepS110, the inverse orthogonal transform unit 109 performs an inverseorthogonal transform on the orthogonal transform coefficient obtained inthe process at step S107, by a characteristic associated with thecharacteristic of the orthogonal transform unit 104.

At step S111, the computing unit 110 adds the predicted image to thelocally decoded difference information and thereby creates a locallydecoded image (an image corresponding to the input to the computing unit103). At step S112, the deblocking filter 111 performs, whereappropriate, a deblocking filter process on the locally decoded imageobtained in the process at step S111.

At step S113, the adaptive loop filter 112 and the filter coefficientcontrol unit 121 independently perform, on a slice-by-slice basis, anadaptive loop filter process on the decoded image having been subjectedto the deblocking filter process.

At step S114, the frame memory 113 stores the decoded image having beensubjected to the adaptive loop filter process in the process at stepS113. Note that those images not having been subjected to a filterprocess by the deblocking filter 111 or the adaptive loop filter 112 arealso supplied to the frame memory 113 from the computing unit 110 andare stored.

At step S115, the lossless coding unit 106 codes the transformcoefficient quantized in the process at step S108. Namely, losslesscoding such as variable-length coding or arithmetic coding is performedon the difference image.

Note that the lossless coding unit 106 codes the quantized parametercalculated at step S108 and adds the coded parameter to coded data. Inaddition, the lossless coding unit 106 codes information about theprediction mode of the predicted image selected in the process at stepS105, and adds the coded information to coded data obtained by codingthe difference image. That is, the lossless coding unit 106 also codesoptimum intra-prediction mode information supplied from theintra-prediction unit 115, information obtained according to the optimuminter-prediction mode supplied from the motion prediction/compensationunit 116, or the like, and adds the coded information to the coded data.

Furthermore, the lossless coding unit 106 also codes information about afilter process such as alf_flag, and adds the coded information to thecoded data.

At step S116, the accumulation buffer 107 accumulates the coded dataobtained in the process at step S115. The coded data accumulated in theaccumulation buffer 107 is read where appropriate, and the read codeddata is transmitted to the decoding side through a transmission line ora recording medium.

At step S117, the rate control unit 118 controls the rate of thequantization operation of the quantization unit 105 based on the rate(the amount of bit) of the coded data accumulated in the accumulationbuffer 107 in the process at step S116, so as to prevent the occurrenceof overflows or under flows.

When the process at step S117 is completed, the coding process ends.

[Flow of an Adaptive Loop Filter Process]

Next, with reference to a flowchart of FIG. 13, an example of the flowof the adaptive loop filter process performed at step S113 in FIG. 12will be described.

When the adaptive loop filter process starts, at step S131, the controlunit 131 sets, as a processing target (focused pixel), the first pixelin a focused slice which is a processing target. At step S132, thecontrol unit 131 determines whether all pixels have been processed. Ifit is determined that there is an unprocessed pixel, then the controlunit 131 advances the process to step S133 and controls the positiondetermination unit 141.

The position determination unit 141 obtains, at step S133, addressinformation of a focused slice, a focused pixel, etc., and determines,at step S134, the positions of neighboring pixels. That is, the positiondetermination unit 141 determines, based on the position of the focusedpixel in the focused slice, whether the neighboring pixels are locatedin the focused slice (whether available or not).

At step S135, the SML calculation unit 142 calculates the SML (i, j) ofa focused region, according to the position determination resultsobtained at step S134.

At step S136, the class classification unit 143 classifies the focusedpixel into a class, according to the magnitude of the SML (i, j)calculated at step S135.

At step S137, the filter coefficient setting unit 144 sets a filtercoefficient for the focused pixel, according to the class classified atstep S136.

At step S138, the control unit 131 determines whether the value ofalf_flag which is flag information indicating whether to perform anadaptive loop filter process is 1. If it is determined that the value is1, then the control unit 131 advances the process to step S139 andcontrols the filter processing unit 132.

At step S139, the filter processing unit 132 performs a filter processfor the focused pixel, using the filter coefficient set at step S137.

Alternatively, if it is determined at step S138 that the value ofalf_flag is 0, then the control unit 131 advances the process to stepS140. At step S140, the control unit 131 supplies alf_flag to thelossless coding unit 106 to code alf_flag.

At step S141, the control unit 131 updates the processing target to thenext pixel. When the control unit 131 completes the process at stepS141, the control unit 131 puts the process back to step S132 andrepeats the subsequent processes.

When the processes at steps S132 to S141 are repeated in theabove-described manner and it is determined at step S132 that all pixelsin the focused slice have been processed, the control unit 131 ends theadaptive loop filter process and puts the process back to FIG. 12.

[Flow of an SML Calculation Process]

Next, with reference to a flowchart of FIG. 14, an example of the flowof the SML calculation process performed at step S135 in FIG. 13 will bedescribed.

When the SML calculation process starts, the SML calculation unit 142determines, at step S161, whether a neighboring pixel (i−1, j) isincluded in a focused slice.

If it is determined that the neighboring pixel (i−1, j) is included inthe focused slice, then the SML calculation unit 142 advances theprocess to step S162, and uses the pixel value of the neighboring pixelfor calculation of SML without updating the pixel value, as shown in thefollowing equation (2).

R′(i−1,j)=R(i−1,j)  (2)

On the other hand, if it is determined at step S161 that the neighboringpixel (i−1, j) is not included in the focused slice, then the SMLcalculation unit 142 advances the process to step S163, and updates thepixel value of the neighboring pixel using the pixel value of a focusedpixel, as shown in the following equation (3).

R′(i−1,j)=R(i,j)  (3)

At step S164, the SML calculation unit 142 determines whether aneighboring pixel (i+1, j) is included in the focused slice.

If it is determined that the neighboring pixel (i+1, j) is included inthe focused slice, then the SML calculation unit 142 advances theprocess to step S165, and uses the pixel value of the neighboring pixelfor calculation of SML without updating the pixel value, as shown in thefollowing equation (4).

R′(i+1,j)=R(i+1,j)  (4)

On the other hand, if it is determined at step S164 that the neighboringpixel (i+1, j) is not included in the focused slice, then the SMLcalculation unit 142 advances the process to step S166, and updates thepixel value of the neighboring pixel using the pixel value of thefocused pixel, as shown in the following equation (5).

R′(i+1,j)=R(i,j)  (5)

At step S167, the SML calculation unit 142 determines whether aneighboring pixel (i, j−1) is included in the focused slice.

If it is determined that the neighboring pixel (i, j−1) is included inthe focused slice, then the SML calculation unit 142 advances theprocess to step S168, and uses the pixel value of the neighboring pixelfor calculation of SML without updating the pixel value, as shown in thefollowing equation (6).

R′(i,j−1)=R(i,j−1)  (6)

On the other hand, if it is determined at step S167 that the neighboringpixel (i, j−1) is not included in the focused slice, then the SMLcalculation unit 142 advances the process to step S169, and updates thepixel value of the neighboring pixel using the pixel value of thefocused pixel, as shown in the following equation (7).

R′(i,j−1)=R(i,j)  (7)

At step S170, the SML calculation unit 142 determines whether aneighboring pixel (i, j+1) is included in the focused slice.

If it is determined that the neighboring pixel (i, j+1) is included inthe focused slice, then the SML calculation unit 142 advances theprocess to step S171, and uses the pixel value of the neighboring pixelfor calculation of SML without updating the pixel value, as shown in thefollowing equation (8).

R′(i,j+1)=R(i,j+1)  (8)

On the other hand, if it is determined at step S170 that the neighboringpixel (i, j+1) is not included in the focused slice, then the SMLcalculation unit 142 advances the process to step S172, and updates thepixel value of the neighboring pixel using the pixel value of thefocused pixel, as shown in the following equation (9).

R′(i,j+1)=R(i,j)  (9)

At step S173, on the basis of the processing results of theabove-described processes, the SML calculation unit 142 calculates theSML(i, j) of the focused pixel using the pixel values of the neighboringpixels, as shown in the following equation (10).

SML(i,j)=|2.times.R′(i,j)−R(i−1,j)−R(i+1,j)|+|2.times.R′(i,j)−R(i,j−1−)−R(i,j+1)|  (10)

When the SML is calculated, the SML calculation unit 142 ends the SMLcalculation process and puts the process back to FIG. 13.

By performing various types of processes in the manner described above,the image coding apparatus 100 can implement parallelization ofslice-by-slice processes, enabling to suppress an increase in processingtime caused by the occurrence of unwanted delay time in an adaptive loopfilter process.

2. SECOND EMBODIMENT

FIG. 15 is a block diagram showing an exemplary main configuration of animage decoding apparatus. An image decoding apparatus 200 shown in FIG.15 decodes coded data generated by the image coding apparatus 100, by adecoding method associated with the coding method.

As shown in FIG. 15, the image decoding apparatus 200 has anaccumulation buffer 201, a lossless decoding unit 202, an inversequantization unit 203, an inverse orthogonal transform unit 204, acomputing unit 205, a deblocking filter 206, an adaptive loop filter207, a screen rearrangement buffer 208, and a D/A conversion unit 209.In addition, the image decoding apparatus 200 has a frame memory 210, aselection unit 211, an intra-prediction unit 212, a motionprediction/compensation unit 213, and a selection unit 214.

Furthermore, the image decoding apparatus 200 has a filter coefficientcontrol unit 221.

The accumulation buffer 201 accumulates transmitted coded data andsupplies the coded data to the lossless decoding unit 202 at specifiedtiming. The lossless decoding unit 202 decodes information that is codedby the lossless coding unit 106 of FIG. 1 and supplied from theaccumulation buffer 201, by a scheme associated with the coding schemeof the lossless coding unit 106. The lossless decoding unit 202 suppliesquantized coefficient data of a difference image which is obtained bythe decoding, to the inverse quantization unit 203.

In addition, the lossless decoding unit 202 determines whether, as anoptimum prediction mode, intra-prediction mode has been selected orinter-prediction mode has been selected, and supplies information aboutthe optimum prediction mode to one of the intra-prediction unit 212 andthe motion prediction/compensation unit 213 that has the mode havingbeen determined to be selected.

The inverse quantization unit 203 inverse quantizes the quantizedcoefficient data obtained by the decoding by the lossless decoding unit202, by a scheme associated with the quantization scheme of thequantization unit 105 of FIG. 1, and supplies the obtained coefficientdata to the inverse orthogonal transform unit 204.

The inverse orthogonal transform unit 204 performs an inverse orthogonaltransform on the coefficient data supplied from the inverse quantizationunit 203, by a scheme associated with the orthogonal transform scheme ofthe orthogonal transform unit 104 of FIG. 1. By this inverse orthogonaltransform process, the inverse orthogonal transform unit 204 obtainsdecoded residual data corresponding to residual data which is beforebeing subjected to an orthogonal transform in the image coding apparatus100.

The decoded residual data obtained by the inverse orthogonal transformis supplied to the computing unit 205. In addition, to the computingunit 205 is supplied a predicted image from the intra-prediction unit212 or the motion prediction/compensation unit 213 through the selectionunit 214.

The computing unit 205 adds the decoded residual data and the predictedimage together, and thereby obtains decoded image data corresponding toimage data which is before a predicted image is subtracted by thecomputing unit 103 of the image coding apparatus 100. The computing unit205 supplies the decoded image data to the deblocking filter 206.

The deblocking filter 206 performs, where appropriate, a deblockingfilter process on the supplied decoded image to remove blockiness in thedecoded image. The deblocking filter 206 supplies the filter-processeddecoded image data to the adaptive loop filter 207.

The adaptive loop filter 207 performs, using the Wiener Filter, a loopfilter process (class classification ALF) on the deblocking filterprocessing result (the decoded image having been subjected to theremoval of blockiness), and thereby improves image quality. The adaptiveloop filter 207 supplies the filter-processed decoded image data to thescreen rearrangement buffer 208 and the frame memory 210. Note that thedecoded image outputted from the computing unit 205 (e.g., a referenceimage used for an intra-prediction) can be supplied to the frame memory210 without passing through the deblocking filter 206 and the adaptiveloop filter 207.

The screen rearrangement buffer 208 rearranges images. Specifically, theframe order rearranged by the screen rearrangement buffer 102 of FIG. 1for coding order is rearranged to the original display order. The D/Aconversion unit 209 D/A converts an image supplied from the screenrearrangement buffer 208, and outputs the image to a display which isnot shown, to display the image.

The frame memory 210 stores the supplied decoded image and supplies, asa reference image, the stored decoded image to the selection unit 211 atspecified timing or based on a request from an external source such asthe intra-prediction unit 212 or the motion prediction/compensation unit213.

The selection unit 211 selects a supply destination of the referenceimage supplied from the frame memory 210. When an intra-coded image isdecoded, the selection unit 211 supplies the reference image suppliedfrom the frame memory 210, to the intra-prediction unit 212.Alternatively, when an inter-coded image is decoded, the selection unit211 supplies the reference image supplied from the frame memory 210, tothe motion prediction/compensation unit 213.

To the intra-prediction unit 212 are supplied, where appropriate, fromthe lossless decoding unit 202 information indicating intra-predictionmode which is obtained by decoding header information, etc. Theintra-prediction unit 212 performs an intra-prediction using thereference image obtained from the frame memory 210, in intra-predictionmode used by the intra-prediction unit 115 of FIG. 1, and therebycreates a predicted image. The intra-prediction unit 212 supplies thecreated predicted image to the selection unit 214.

The motion prediction/compensation unit 213 obtains from the losslessdecoding unit 202 information obtained by decoding header information(optimum prediction mode information, difference information, and thecode number of prediction motion vector information, etc.).

The motion prediction/compensation unit 213 performs an inter-predictionusing the reference image obtained from the frame memory 210, ininter-prediction mode used by the motion prediction/compensation unit116 of FIG. 1, and thereby creates a predicted image.

The selection unit 214 supplies the predicted image supplied from theintra-prediction unit 212 or the predicted image supplied from themotion prediction/compensation unit 213, to the computing unit 205.

The filter coefficient control unit 221 classifies a focused pixel intoa class based on the SML thereof, to set a filter coefficient used bythe adaptive loop filter 207, and supplies the filter coefficient to theadaptive loop filter 207. Note that the filter coefficient control unit221 calculates the SML of the focused pixel without referring toinformation in other slices than a focused slice.

By doing so, the adaptive loop filter 207 can perform a filter processindependently on a slice-by-slice basis.

[Adaptive Loop Filter and Filter Coefficient Control Unit]

FIG. 16 is a block diagram showing an exemplary main configuration ofthe adaptive loop filter 207 and the filter coefficient control unit221.

The adaptive loop filter 207 basically has the same configuration as theadaptive loop filter 112 (FIG. 11) of the image coding apparatus 100,and basically performs the same processes. That is, as shown in FIG. 16,the adaptive loop filter 207 has a control unit 231 and a filterprocessing unit 232.

The filter coefficient control unit 221 basically has the sameconfiguration as the filter coefficient control unit 121 (FIG. 11) ofthe image coding apparatus 100, and basically performs the sameprocesses. That is, as shown in FIG. 16, the filter coefficient controlunit 221 has a position determination unit 241, an SML calculation unit242, a class classification unit 243, and a filter coefficient settingunit 244.

The control unit 231 basically performs the same processes as thecontrol unit 131 (FIG. 11). Note, however, that the control unit 231obtains from the lossless decoding unit 202 alf_flag supplied from theimage coding apparatus 100 and controls, according to the value of thatalf_flag, whether to perform class classification ALF (the operation ofthe filter coefficient control unit 221 and the filter processing unit232).

The filter processing unit 232 is controlled by the control unit 231 aswith the filter processing unit 132 (FIG. 11), to perform a filterprocess on a pixel value having been subjected to a deblocking filterprocess and supplied from the deblocking filter 206, using a filtercoefficient supplied from the filter coefficient setting unit 244. Thefilter processing unit 232 holds the filter-processed pixel value, andsupplies the pixel value to the screen rearrangement buffer 208 and theframe memory 210 to store the pixel value as a reference image. The heldpixel value is reused as the pixel value of a neighboring pixel inprocesses for other pixels which are processed later than a focusedpixel.

The position determination unit 241 to the filter coefficient settingunit 244 in the filter coefficient control unit 221 correspond to theposition determination unit 141 to the filter coefficient setting unit144, respectively, and perform the same processes.

Specifically, the position determination unit 241 obtains, according tocontrol by the control unit 231, address information indicating thepositions of slices, a focused pixel which is a processing target, andthe like, from the lossless decoding unit 202. Those pieces of addressinformation are stored in, for example, an SPS, a PPS, a slice header,or the like, in a bit stream which is transmitted from the image codingapparatus 100. The position determination unit 241 obtains addressinformation from those pieces of information decoded by the losslessdecoding unit 202, and determines the position of the focused pixel in afocused slice, using the address information.

The SML calculation unit 242 calculates the SML of the focused pixelbased on the position determination result (positional information)obtained by the position determination unit 241, and using the pixelvalue of the focused pixel and the pixel values of neighboring pixelswhich are obtained from the filter processing unit 232 (withoutreferring to information in other slices than the focused slice).

The class classification unit 243 classifies the focused pixel into aclass, using the SML calculated by the SML calculation unit 242.

According to class information (class classification result) obtainedfrom the class classification unit 243, the filter coefficient settingunit 244 sets, for the focused pixel, a filter coefficient according tothe class. The filter coefficient setting unit 244 supplies the setfilter coefficient to the filter processing unit 232. The filterprocessing unit 232 performs a filter process for the focused pixel,using the filter coefficient.

[Flow of a Decoding Process]

Next, with reference to a flowchart of FIG. 17, an example of the flowof a decoding process performed by the image decoding apparatus 200 suchas that described above will be described.

When the decoding process starts, at step S201, the accumulation buffer201 accumulates a transmitted bit stream. At step S202, the losslessdecoding unit 202 decodes the bit stream supplied from the accumulationbuffer 201. Specifically, an I-picture, a P-picture, and a B-picturewhich are coded by the lossless coding unit 106 of FIG. 1 are decoded.In addition, various types of information other than difference imageinformation included in the bit stream, such as an SPS, a PPS, and aslice header, are also decoded.

At step S203, the inverse quantization unit 203 inverse quantizes aquantized orthogonal transform coefficient which is obtained in theprocess at step S202. At step S204, the inverse orthogonal transformunit 204 performs an inverse orthogonal transform on the orthogonaltransform coefficient having been inverse quantized at step S203.

At step S205, the intra-prediction unit 212 or the motionprediction/compensation unit 213 performs a prediction process usingsupplied information. At step S206, the selection unit 214 selects apredicted image created at step S205. At step S207, the computing unit205 adds the predicted image selected at step S206 to difference imageinformation obtained by the inverse orthogonal transform at step S204.By this, a decoded image is obtained.

At step S208, the deblocking filter 206 performs, where appropriate, adeblocking filter process on the decoded image obtained at step S207.

At step S209, the adaptive loop filter 207 and the filter coefficientcontrol unit 221 perform, where appropriate, an adaptive loop filterprocess on the decoded image having been subjected to the deblockingfilter process. Note that the adaptive loop filter 207 and the filtercoefficient control unit 221 perform the adaptive loop filter processindependently on a slice-by-slice basis.

A detail of the adaptive loop filter process is the same as that of theadaptive loop filter process performed by the image coding apparatus 100which is described with reference to the flowchart of FIG. 13, and thus,description thereof is omitted.

At step S210, the screen rearrangement buffer 208 rearranges the imagehaving been subjected to the filter process at step S209. Specifically,the frame order rearranged by the screen rearrangement buffer 102 of theimage coding apparatus 100 for coding is rearranged to the originaldisplay order.

At step S211, the D/A conversion unit 209 D/A converts the image whoseframe order has been rearranged at step S210. The image is outputted toa display which is not shown, and is displayed.

At step S212, the frame memory 210 stores the image having beensubjected to the filter process at step S209. The image is used as areference image for creation of a predicted image at step S205.

When the process at step S212 is completed, the decoding process ends.

By performing various types of processes in the above-described manner,the adaptive loop filter 207 and the filter coefficient control unit 221only need to refer to information in a focused slice and thus do notneed to wait until the processes for other slices have been completed.Therefore, the image decoding apparatus 200 can implementparallelization of slice-by-slice processes, enabling to suppress anincrease in processing time caused by the occurrence of unwanted delaytime in an adaptive loop filter process.

OTHER EXAMPLES

Note that although the above describes that when a neighboring pixel isnot included in a focused slice, SML is calculated without referring toinformation in other slices than the focused slice and then classclassification is performed, the configuration is not limited thereto.For example, for a focused pixel whose neighboring pixel is not includedin a focused slice, computation for calculating SML may be omitted andthe focused pixel may be classified into a predetermined, specifiedclass (a specified filter coefficient may be set). By doing so, thesetting of a filter coefficient becomes easier.

In addition, a filter process for a focused pixel whose neighboringpixel is not included in a focused slice may be omitted.

With reference to a flowchart of FIG. 18, an example of the flow of anadaptive loop filter process for that case will be described.

In this case, too, each process of the adaptive loop filter process isbasically performed in the same manner as in the case of FIG. 13.Specifically, the processes at steps S231 to S234 are performed in thesame manner as the processes at steps S131 to S134 in FIG. 13.

Note, however, that at step S235 the position determination unit 141determines whether neighboring pixels are included in a focused slice,and only when it is determined that the neighboring pixels are includedin the focused slice, the position determination unit 141 advances theprocess to step S236. In this case, the processes at steps S236 to S242are performed in the same manner as the processes at steps S135 to S141in FIG. 13.

In addition, if it is determined at step S235 that the neighboringpixels are not included in the focused slice, then the positiondetermination unit 141 puts the process back to step S232 and changesthe processing target to the next pixel.

By performing an adaptive loop filter process in this manner, theadaptive loop filter 112 and the filter coefficient control unit 121 canperform an adaptive loop filter process more easily.

Note that although the above describes an adaptive loop filter processperformed by the image coding apparatus 100, an adaptive loop filterprocess performed by the image decoding apparatus 200 may also beperformed in the same manner.

In addition, although the above describes that the pixels adjacentabove, below, and to the left and right of a focused pixel serve asneighboring pixels, the configuration is not limited thereto. Forexample, a pixel adjacent to the upper right of the focused pixel, apixel adjacent to the lower right, a pixel adjacent to the upper left, apixel adjacent to the lower left, or the like, may serve as aneighboring pixel. Furthermore, neighboring pixels do not need to beadjacent to the focused pixel. In addition, the SML calculation methodmay be any other method than that described above. For example, thenumber of neighboring pixels is any number and thus the number ofneighboring pixels may be 5 or more or 3 or less.

Furthermore, although the above describes that the image decodingapparatus 200 calculates a filter coefficient in the same manner as theimage coding apparatus 100, the configuration is not limited thereto. Afilter coefficient used by the image coding apparatus 100 may betransmitted to the image decoding apparatus 200, and the image decodingapparatus 200 may perform an adaptive loop filter process using thefilter coefficient supplied from the image coding apparatus 100. In thatcase, the filter coefficient control unit 221 can be omitted.

In addition, the image coding apparatus 100 (control unit 131) maygenerate, for each slice, a flag that controls whether to perform classclassification ALF independently on a slice-by-slice basis, and transmitthe flags to the image decoding apparatus 200.

In a slice set with this flag (e.g., the value is 1), the image codingapparatus 100 performs, as described above, class classification ALFindependently on a slice-by-slice basis, using only information onavailable pixels. On the other hand, in a slice not set with the flag(e.g., the value is 0), even when a neighboring pixel belongs to anotherslice, the image coding apparatus 100 calculates SML after the pixelvalues of all neighboring pixels have been obtained, and classifies afocused pixel into a class to set a filter coefficient.

In the image decoding apparatus 200, when the value of the flag suppliedfrom the image coding apparatus 100 is 1, class classification ALF isperformed such that a focused slice is made independent of other slices,and when the value of the flag supplied from the image coding apparatus100 is 0, class classification ALF is performed such that the focusedslice is not made independent of other slices.

Although the above describes that class classification is performedbased on the magnitude of SML, the parameter used for classclassification may be any parameter as long as the parameter is obtainedby referring to pixels other than a focused pixel. For example, avariance value may be used or the magnitude of the amount of change inpixel value may be used. In that case, too, by performing calculation ofthe parameter without using information in other slices than a focusedslice, as in the case of the above-described SML, the independence ofslice-by-slice processes can be secured.

3. THIRD EMBODIMENT [Adaptive Offset Filter]

Although the above describes an adaptive loop filter, the presenttechnique can also be applied to any process as long as the process issuch that when a focused pixel is processed, its neighboring pixels arereferred to. For example, the present technique can also be applied toan adaptive offset filter process which is adopted in HEVC.

An adaptive offset filter in an HEVC scheme will be described below. Inthe HEVC scheme, the Sample Adaptive Offset scheme described inNon-Patent Document 2 is adopted.

The process of an adaptive offset filter (Picture Quality AdaptiveOffset: PQAO) is performed between the process of a deblocking filterand the process of an adaptive loop filter.

For the kinds of adaptive offset, there are of two kinds called bandoffset and six kinds called edge offset, and furthermore, it is alsopossible not to adapt offset. An image is partitioned into a quad-tree,and a selection can be made for each region as to which one of theabove-described kinds of adaptive offset is to be used for coding.

This selection information is coded by a coding unit (Entropy Coding) asPQAO Info. and a bit stream is generated, and the generated bit streamis transmitted to the decoding side. By using this method, codingefficiency can be improved.

Now, with reference to FIG. 19, a quad-tree structure will be described.Although quad-tree partitioning (quad-tree structuring) can be performedon a per arbitrary region basis, in the following, description is madeassuming that quad-tree partitioning is performed on an LCU-by-LCUbasis.

A region 0 shown in A1 of FIG. 19 shows a state in which an LCU is notpartitioned (Level-0 (partition depth 0)). The image coding apparatusfirst computes a cost function value J0 for the region 0 (i.e., an LCU).Four regions 1 to 4 shown in A1 of FIG. 19 show a state in which theregion 0 is partitioned vertically and horizontally into two regions(four regions in total) (Level-1 (partition depth 1)). The image codingapparatus calculates cost function values J1, J2, J3, and J4 for theregions 1 to 4.

When cost function values for the respective regions 0 to 4 arecalculated, as shown in A2 of FIG. 19, the image coding apparatuscompares the cost function values on a per Level (partition depth)basis, and selects a Level (partition depth) with the smaller value. Forexample, in the case of J0>(J1+J2+J3+J4), the image coding apparatusselects the Level-1 Partitions. That is, in this case, the LCU ispartitioned into at least four regions, the regions 1 to 4.

Note that, for example, in the case of J0<(J1+J2+J3+J4), the imagecoding apparatus selects the Level-0 Partitions. In this case, the LCUis not partitioned (the region 0).

The image coding apparatus repeats such region partitioning for eachregion formed by region partitioning. Regions 5 to 20 shown in A3 ofFIG. 19 show a state in which each of the regions 1 to 4 shown in A2 ofFIG. 19 is partitioned vertically and horizontally into two regions(four regions in total) (Level-2 (partition depth 2)). That is, the LCUis partitioned into 16 regions. The image coding apparatus calculatescost function values J5 to J20 for the regions 5 to 20.

When cost function values for the respective regions to 20 arecalculated, as shown in A4 of FIG. 19, the image coding apparatuscompares the cost function values between Level-1 (partition depth 1)and Level-2 (partition depth 2), and selects a Level (partition depth)with the smaller value.

Specifically, the image coding apparatus compares the cost functionvalue J1 for the region 1 with the sum of the cost function values forthe region 5, the region 6, the region 9, and the region 10. Forexample, in the case of J1<(J5+J6+J9+J10), the image coding apparatusselects the Level-1 Partitions. In this case, the region 1 is notpartitioned any further. In contrast, for example, in the case ofJ1>(J5+J6+J9+J10), the image coding apparatus selects the Level-2Partitions. In this case, the region 1 is partitioned into at least fourregions, the region 5, the region 6, the region 9, and the region 10.

In addition, the image coding apparatus compares the cost function valueJ2 for the region 2 with the sum of the cost function values for aregion 7, a region 8, a region 11, and a region 12. For example, in thecase of J2>(J7+J8+J11+J12), the image coding apparatus selects theLevel-2 Partitions. In this case, the region 2 is partitioned into atleast four regions, the region 7, the region 8, the region 11, and theregion 12. In contrast, for example, in the case of J2<(J7+J8+J11+J12),the image coding apparatus selects the Level-1 Partitions. In this case,the region 2 is not partitioned any further.

Furthermore, the image coding apparatus compares the cost function valueJ3 for the region 3 with the sum of the cost function values for aregion 13, a region 14, a region 17, and a region 18. For example, inthe case of J3>(J13+J14+J17+J18), the image coding apparatus selects theLevel-2 Partitions. In this case, the region 3 is partitioned into atleast four regions, the region 13, the region 14, the region 17, and theregion 18. In contrast, for example, in the case ofJ3<(J13+J14+J17+J18), the image coding apparatus selects the Level-1Partitions. In this case, the region 3 is not partitioned any further.

In addition, the image coding apparatus compares the cost function valueJ4 for the region 4 with the sum of the cost function values for aregion 15, a region 16, a region 19, and a region 20. For example, inthe case of J4<(J15+J16+J19+J20), the image coding apparatus selects theLevel-1 Partitions. In this case, the region 4 is not partitioned anyfurther. In contrast, for example, in the case of J4>(J15+J16+J19+J20),the image coding apparatus selects the Level-2 Partitions. In this case,the region 4 is partitioned into at least four regions, the region 15,the region 16, the region 19, and the region 20.

The image coding apparatus further repeats the same region partitioningon the Level-2 Partitions. The image coding apparatus repeats suchregion partitioning until partitioning is no longer performed or untilreaching a predetermined SCU Level (partition depth).

When, for example, a Quad-tree structure such as that shown in FIG. A4of FIG. 19 is obtained as a result of such region partitioning, theimage coding apparatus determines the regions in the Quad-treestructure, as final Quad-tree regions (Partitions).

For each of the regions of the Quad-tree structure determined in thismanner, an offset mode (including whether to perform offset) is selectedusing cost function values. Specifically, the image coding apparatuscalculates, for each region, cost function values for all modesincluding two kinds of band offset, six kinds of edge offset, and nooffset, and selects a mode with the smallest cost function value.

In the case of the example of FIG. 19, as shown on the right side of awhite arrow, for the region 1, EO(4), i.e., the fourth kind of edgeoffset, is determined. For the region 7, OFF, i.e., no offset, isdetermined, and for the region 8, EO(2), i.e., the second kind of edgeoffset, is determined. For the regions 11 and 12, OFF, i.e., no offset,is determined.

In addition, for the region 13, BO(1), i.e., the first kind of bandoffset, is determined, and for the region 14, EO(2), i.e., the secondkind of edge offset, is determined. For the region 17, BO(2), i.e., thesecond kind of band offset, is determined, and for the region 18, BO(1),i.e., the first kind of band offset, is determined. For the region 4,EO(1), i.e., the first kind of edge offset, is determined.

Next, with reference to FIGS. 20A, 20B, 20C, 20D, 20E, and 20F, a detailof edge offset will be described.

In edge offset, a comparison is made between the pixel value of afocused pixel which is a processing target (focused pixel value) and thepixel values of neighboring pixels located in the neighborhood of (e.g.,adjacent to) the focused pixel (neighboring pixel values), and for acategory associated therewith, an offset value is transmitted.

For edge offset, there are four 1D patterns shown in FIGS. 20A, 20B,20C, and 20D and two 2D patterns shown FIGS. 20E and 20F, and an offsetis transmitted therefor based on the categories shown in FIGS. 21A and21B.

FIG. 20A shows a 1-D, 0-degree pattern in which neighboring pixels arearranged one-dimensionally to the left and right of a focused pixel C,i.e., which forms an angle of 0 degrees with the pattern shown in FIG.20A. FIG. 20B shows a 1-D, 90-degree pattern in which neighboring pixelsare arranged one-dimensionally above and below a focused pixel C, i.e.,which forms an angle of 90 degrees with the pattern shown in FIG. 20A.

FIG. 20C shows a 1-D, 135-degree pattern in which neighboring pixels arearranged one-dimensionally to the upper left and lower right of afocused pixel C, i.e., which forms an angle of 135 degrees with thepattern shown in FIG. 20A. FIG. 20D shows a 1-D, 135-degree pattern inwhich neighboring pixels are arranged one-dimensionally to the upperright and lower left of a focused pixel C, i.e., which forms an angle of45 degrees with the pattern shown in FIG. 20A.

FIG. 20E shows a 2-D, cross pattern in which neighboring pixels arearranged two-dimensionally above, below, and to the left and right of afocused pixel C, i.e., which crosses the focused pixel C. FIG. 20F showsa 2-D, diagonal pattern in which neighboring pixels are arrangedtwo-dimensionally to the upper right, lower left, upper left, and lowerright of a focused pixel C, i.e., which diagonally crosses the focusedpixel C.

FIG. 21A shows a classification rule for 1-D patterns. The patternsshown in FIGS. 20A, 20B, 20C, and 20D are classified into five types ofcategories such as those shown in FIG. 21A, and an offset is calculatedbased on the categories and is transmitted to the decoding unit.

When the pixel value of the focused pixel C is smaller than the pixelvalues of two neighboring pixels, this pattern is classified intocategory 1. When the pixel value of the focused pixel C is smaller thanthe pixel value of one neighboring pixel and matches the pixel value ofthe other neighboring pixel, this pattern is classified into category 2.When the pixel value of the focused pixel C is larger than the pixelvalue of one neighboring pixel and matches the pixel value of the otherneighboring pixel, this pattern is classified into category 3. When thepixel value of the focused pixel C is larger than the pixel values oftwo neighboring pixels, this pattern is classified into category 4. Inthe case of none of the above, the pattern is classified into category0.

FIG. 21B shows a classification rule for 2-D patterns The patterns shownin FIGS. 20E and 20F are classified into seven types of categories suchas those shown in FIG. 21B, and an offset is transmitted to the decodingunit based on the categories.

When the pixel value of the focused pixel C is smaller than the pixelvalues of four neighboring pixels, this pattern is classified intocategory 1. When the pixel value of the focused pixel C is smaller thanthe pixel values of three neighboring pixels and matches the pixel valueof the fourth neighboring pixel, this pattern is classified intocategory 2. When the pixel value of the focused pixel C is smaller thanthe pixel values of three neighboring pixels and is larger than thepixel value of the fourth neighboring pixel, this pattern is classifiedinto category 3.

When the pixel value of the focused pixel C is larger than the pixelvalues of three neighboring pixels and is smaller than the pixel valueof the fourth neighboring pixel, this pattern is classified intocategory 4. When the pixel value of the focused pixel C is larger thanthe pixel values of three neighboring pixels and matches the pixel valueof the fourth neighboring pixel, this pattern is classified intocategory 5. When the pixel value of the focused pixel Cis larger thanthe pixel values of four neighboring pixels, this pattern is classifiedinto category 6. In the case of none of the above, the pattern isclassified into category 0.

As described above, in edge offset, 1D patterns only need to make acomparison for two adjacent pixels and thus have a lower amount ofcomputation. Note that in a high efficiency coding condition, a 1-bitoffset value is made more accurate compared to a low delay codingcondition and is transmitted to the decoding side.

As such, in edge offset, upon processing a focused pixel, itsneighboring pixels are referred to. Therefore, for example, as in thecase of calculation of SML which is described with reference to FIGS. 7to 10, when a neighboring pixel to be referred to is present in adifferent slice than a focused slice, an offset value for the focusedpixel for edge offset cannot be calculated until the process for theslice in which the neighboring pixel is present has been completed.

For example, when a focused pixel which is a processing target ispresent at an edge of a focused slice and a neighboring pixel to bereferred to is located in another slice (neighboring slice), the processfor the focused pixel (or the entire focused slice) cannot start untilthe process for the neighboring slice has been completed. In such acase, the neighboring slice and the focused slice cannot be processedindependently of each other. Thus, for example, the neighboring sliceand the focused slice cannot be processed in parallel and thus theprocessing time increases, which may cause a reduction in throughput.

In addition, the case is not limited to such a boundary between slices,and it is also considered, for example, that when a focused pixel ispresent at a picture edge, a neighboring pixel to be referred to islocated outside a picture (outside a valid pixel region) (i.e.,virtually not present). In such a case, too, the neighboring pixel isunavailable as in the case of being present in another slice.

In such a case, the focused pixel is not processed normally, which maycause an increase in processing time due to an error process, etc. Inaddition, it may become a cause of degradation in the image quality of adecoded image.

Hence, to suppress such an increase in processing time, by applying thepresent technique so that slices can be processed independently of eachother, an adaptive offset process for a focused pixel is performedwithout referring to other slices than a focused slice.

[Image Coding Apparatus]

FIG. 22 is a block diagram showing an exemplary main configuration of animage coding apparatus.

An image coding apparatus 300 shown in FIG. 22 is basically the sameimage processing apparatus as the image coding apparatus 100 of FIG. 1,and codes image data using a prediction process, like an H.264 and MPEG4Part10 (AVC) coding scheme.

As shown in FIG. 22, the image coding apparatus 300 basically has thesame configuration as the image coding apparatus 100 and basicallyperforms the same processes. Note, however, that the image codingapparatus 300 has an adaptive offset unit 301 and a neighboring pixelvalue control unit 302, in addition to the configuration of the imagecoding apparatus 100. Note that although in FIG. 22 a filter coefficientcontrol unit 121 is omitted, it is of course possible to provide afilter coefficient control unit 121 as in FIG. 1.

In the case of the example of FIG. 22, a deblocking filter 111 suppliesa filter-processed decoded image to the adaptive offset unit 301.

The adaptive offset unit 301 performs region partitioning on thedeblocking filter processing result (a reconstructed image having beensubjected to removal of blockiness) so as to obtain a quad-treestructure, and performs an adaptive offset process (adaptive offsetfilter (Picture Quality Adaptive Offset: PQAO) process) on aregion-by-region basis. At that time, in a mode in which neighboringpixel values are referred to upon the process for a focused pixel (e.g.,edge offset mode), the adaptive offset unit 301 calculates an offsetvalue for a focused pixel value using neighboring pixel values which aremade available by control by the neighboring pixel value control unit302.

The adaptive offset unit 301 determines cost function values for theoffset processing result in the respective modes, and selects a modewith the smallest value. The adaptive offset unit 301 performs an offsetprocess in the selected mode, and supplies the offset processing resultto an adaptive loop filter 112. In addition, the adaptive offset unit301 supplies a quad-tree structure indicating region partitioningresults and selection information which is information about modeselection (PQAO Info.) to a lossless coding unit 106 to transmit thosepieces of information to the decoding side.

Note that the adaptive offset unit 301 performs the offset process on aslice-by-slice basis. More specifically, the adaptive offset unit 301performs the offset process on a per specified partial region (e.g., anLCU) basis, the partial regions being obtained by dividing a slice. Thatis, the adaptive offset unit 301 can process slices independently ofeach other.

The adaptive loop filter 112 performs, using the Wiener Filter, a loopfilter process on the adaptive offset processing result, and therebyimproves image quality. Note that although in FIG. 22 an arrow from theadaptive loop filter 112 to the lossless coding unit 106 is omitted, theadaptive loop filter 112 may supply alf_flag, a filter coefficient,etc., to the lossless coding unit 106 to transmit them to the decodingside.

The lossless coding unit 106 codes, for example, those pieces ofinformation supplied from the adaptive offset unit 301, includes thecoded information in a bit stream, and transmits the bit stream to thedecoding side. By using this method, coding efficiency can be improved.

The neighboring pixel value control unit 302 controls neighboring pixelvalues which are referred to when the adaptive offset unit 301calculates an offset value. Specifically, when a neighboring pixel valueto be referred to by the adaptive offset unit 301 is unavailable, theneighboring pixel value control unit 302 sets, instead of the value, anavailable value as a neighboring pixel value (the unavailable value isreplaced by the available value).

Here, the term “unavailable” refers to the case in which a neighboringpixel to be referred to is not present in a focused slice which is aprocessing target (a slice in which a focused pixel is present). Forexample, such a case includes one in which the neighboring pixel islocated in a slice different than the focused slice, and one in whichthe neighboring pixel is located outside a picture (i.e., not present).

For example, the neighboring pixel value control unit 302 may adopt,instead of the pixel value of an unavailable neighboring pixel, forexample, the pixel value of an available pixel located near theneighboring pixel (including a pixel adjacent to the neighboring pixel),as a neighboring pixel value, utilizing the pixel-value correlationbetween pixels. Furthermore, as the pixel near the neighboring pixel, afocused pixel may be adopted.

In addition, to facilitate computation, a specified, fixed value may beused instead of the pixel value of an unavailable neighboring pixel.

Of course, other methods may be used. For example, a result of specifiedcomputation using the pixel value(s) of one or a plurality of otheravailable pixels, etc., may be used instead of the pixel value of anunavailable neighboring pixel.

The neighboring pixel value control unit 302 obtains information aboutthe position (coordinates) of a focused pixel from the adaptive offsetunit 301. In addition, the neighboring pixel value control unit 302obtains address information including information about the positions(coordinates) of LCUs, information about slice boundaries (boundariesbetween slices, picture edges, and the like), etc., from the losslesscoding unit 106.

The neighboring pixel value control unit 302 determines based on theaddress information whether neighboring pixel values for the focusedpixel specified by the adaptive offset Unit 301 are available or not.For example, when a neighboring pixel value is available, theneighboring pixel value control unit 302 sets the pixel value of theneighboring pixel as a neighboring pixel value to be referred to by theadaptive offset unit 301, and supplies information thereabout(neighboring pixel specification information) to the adaptive offsetunit 301.

Alternatively, for example, when a neighboring pixel value isunavailable, the neighboring pixel value control unit 302 determines avalue that is used instead of the neighboring pixel value, sets thevalue as a neighboring pixel value to be referred to by the adaptiveoffset unit 301, and supplies information thereabout (neighboring pixelspecification information) to the adaptive offset unit 301.

The adaptive offset unit 301 performs a process using neighboring pixelvalues specified by the neighboring pixel value control unit 302 and canthereby always perform an adaptive offset process using availableneighboring pixel values. By this, the image coding apparatus 300 canimplement parallelization of slice-by-slice processes, enabling tosuppress an increase in processing time caused by the occurrence ofunwanted delay time in an adaptive offset process, etc.

[Adaptive Offset Unit]

FIG. 23 is a block diagram showing an exemplary main configuration ofthe adaptive offset unit 301. As shown in FIG. 23, the adaptive offsetunit 301 has a quad-tree structure determination unit 311, a focusedregion selection unit 312, an offset calculation unit 313, an offsetunit 314, and a pixel buffer 315.

The quad-tree structure determination unit 311 performs regionpartitioning on each of a plurality of specified regions (e.g., LCUs)into which a slice is divided, in the manner described with reference toFIG. 19, for example, and thereby obtains a quad-tree structure. Notethat although an adaptive offset process performed by the adaptiveoffset unit 301 can be performed on a per arbitrary region basis, in thefollowing an adaptive offset process is performed on an LCU-by-LCUbasis. In this case, each partial region obtained by partitioning an LCUinto a quad-tree structure (region partitioning) is a CU.

When the quad-tree structure determination unit 311 partitions an LCUinto a quad-tree structure and thereby sets each CU, the quad-treestructure determination unit 311 supplies information indicating thequad-tree structure and deblocked pixel values to the focused regionselection unit 312.

The focused region selection unit 312 selects, based on the suppliedquad-tree structure, the CUs one by one in turn as a processing target.The focused region selection unit 312 ultimately selects all CUs in theLCU as a processing target. The focused region selection unit 312supplies the quad-tree structure supplied from the quad-tree structuredetermination unit 311 and focused region specification informationindicating a specified focused region (focused CU), to the offsetcalculation unit 313. In addition, the focused region selection unit 312supplies deblocked pixel values in the focused region to the offsetcalculation unit 313. Note that the focused region selection unit 312also supplies, if necessary, deblocked pixel values in other regionsthan the focused region to the offset calculation unit 313.

The offset calculation unit 313 calculates an offset value for eachpixel in the focused region specified by the focused regionspecification information which is supplied from the focused regionselection unit 312. The offset calculation unit 313 can calculate anoffset value in any number of modes. The offset calculation unit 313determines cost function values for the offset processing results in therespective modes, and selects a mode with the smallest value.

At that time, the offset calculation unit 313 performs the process in amode in which neighboring pixel values are referred to, using the pixelvalues of neighboring pixels specified by the neighboring pixel valuecontrol unit 302.

The offset calculation unit 313 supplies the offset values in theselected modes together with the quad-tree structure, to the offset unit314. In addition, the offset calculation unit 313 supplies selectioninformation (PQAOinfo) indicating the mode selection results, etc.,together with the quad-tree structure, to the lossless coding unit 106to code them.

As shown in FIG. 23, the offset calculation unit 313 has a no-offsetcomputing unit 321, a band offset computing unit 322, an edge offsetcomputing unit 323, and an offset selection unit 324.

It is assumed that in the offset calculation unit 313, for the kinds(modes) of adaptive offset, there are prepared in advance two kinds ofmodes called band offset and six kinds of modes called edge offset andfurthermore a mode in which offset is not adapted. The number and kindof adaptive offset mode may be any number and any kind. For example,other modes than those described above may be included, or some or allof the above-described modes may be omitted. The offset calculation unit313 has processing units for the respective modes serving as options.

The no-offset computing unit 321 calculates a cost function value in amode in which offset is not adapted. The no-offset computing unit 321supplies the calculated cost function value together with the quad-treestructure, to the offset selection unit 324.

The band offset computing unit 322 determines an offset value for eachof the two kinds of band offset modes, and further determines a costfunction value for an offset processing result using the offset value.The band offset computing unit 322 supplies the offset values and thecost function values which are calculated for each of the two kinds ofband offset modes, together with the quad-tree structure to the offsetselection unit 324.

The edge offset computing unit 323 determines an offset value for eachof the six kinds of edge offset modes, and further determines a costfunction value for an offset processing result using the offset value.

At that time, the edge offset computing unit 323 provides theneighboring pixel value control unit 302 with information about afocused pixel and neighboring pixels. Based on those pieces ofinformation and address information obtained from the lossless codingunit 106, the neighboring pixel value control unit 302 specifiesneighboring pixels to be referred to, and supplies neighboring pixelspecification information thereabout to the edge offset computing unit323. The edge offset computing unit 323 performs calculation of anoffset value using available neighboring pixel values specified by theneighboring pixel specification information.

The edge offset computing unit 323 supplies the offset values and thecost function values which are calculated for each of the six kinds ofedge offset modes, together with the quad-tree structure to the offsetselection unit 324.

The offset selection unit 324 selects a mode to be adopted. The offsetselection unit 324 compares the supplied cost function values for therespective modes, and selects a mode with the smallest value. The offsetselection unit 324 supplies the offset value for the selected modetogether with the quad-tree structure, to the offset unit 314. Inaddition, the offset selection unit 324 supplies selection information(PQAOinfo) indicating the selected mode, etc., together with thequad-tree structure to the lossless coding unit 106 to code theinformation and transmit the coded information to the decoding side.

The offset unit 314 obtains from the focused region selection unit 312deblocked pixel values in the focused region, and performs an offsetprocess on the deblocked pixel values, using the offset values suppliedfrom the offset calculation unit 313 (offset selection unit 324). Theoffset unit 314 supplies the obtained offset-processed pixel values tothe pixel buffer 315 to store the pixel values.

The pixel buffer 315 supplies the offset-processed pixel values storedtherein to the adaptive loop filter 112 at specified timing or accordingto a request from an external source.

[Edge Offset Computing Unit and Neighboring Pixel Value Control Unit]

FIG. 24 is a block diagram showing an exemplary main configuration ofthe edge offset computing unit 323 and the neighboring pixel valuecontrol unit 302.

As shown in FIG. 24, the edge offset computing unit 323 has a buffer331, a pattern selection unit 332, a focused pixel selection unit 333, acategory determination unit 334, an offset value calculation unit 335,an offset unit 336, and a cost function calculation unit 337.

The buffer 331 obtains a quad-tree structure and focused regionspecification information which are supplied from the focused regionselection unit 312, and obtains deblocked pixel values supplied from thefocused region selection unit 312, and stores them. The deblocked pixelvalues are held until they are no longer used as a focused pixel valueor neighboring pixel values. When the buffer 331 obtains pixel values ina focused region, the buffer 331 controls the pattern selection unit 332to perform a process. In addition, the buffer 331 supplies informationabout the focused region (region information) to the focused pixelselection unit 333. Furthermore, the buffer 331 supplies the deblockedpixel values stored therein to the category determination unit 334 andthe offset unit 336.

The pattern selection unit 332 sequentially selects one of a pluralityof neighboring pixel patterns such as those described with reference toFIGS. 20A, 20B, 20C, 20D, and 20F. Specifically, the pattern selectionunit 332 selects six kinds of edge offset modes one by one. The patternselection unit 332 repeats such a selection until all patterns have beenselected. The pattern selection unit 332 supplies pattern specificationinformation indicating the selected pattern, to the focused pixelselection unit 333 and the neighboring pixel value control unit 302(neighboring pixel availability determination unit 341).

The focused pixel selection unit 333 obtains the information about thefocused region (region information) from the buffer 331, and selectsfocused pixels serving as processing targets one by one from the focusedregion. The focused pixel selection unit 333 repeats such a selectionuntil all pixels in the focused region have been selected. The focusedpixel selection unit 333 supplies focused pixel specificationinformation indicating the focused pixel, together with the patternspecification information supplied from the pattern selection unit 332,to the category determination unit 334. In addition, the focused pixelselection unit 333 supplies the focused pixel specification informationto the neighboring pixel value control unit 302 (neighboring pixelavailability determination unit 341).

The category determination unit 334 determines a category for thefocused pixel specified by the focused pixel specification information,based on the table shown in FIGS. 21A and 21B, for example. That is, thecategory determination unit 334 determines a category based onneighboring pixel values and a focused pixel value. Note that thecategory classification method may be any method and thus is not limitedto the example of FIGS. 21A and 21B. Upon the category determination,the category determination unit 334 utilizes, as neighboring pixelvalues, the pixel values of neighboring pixels specified by neighboringpixel specification information which is supplied from the neighboringpixel value control unit 302 (neighboring pixel value determination unit342).

The neighboring pixel value control unit 302 (neighboring pixel valuedetermination unit 342) specifies available values as neighboring pixelvalues. Therefore, the pixel values of neighboring pixels specified byneighboring pixel specification information are always available.Therefore, the category determination unit 334 can determine a categoryfor the focused pixel without the need to wait until the processes forother pixels have been completed. That is, the category determinationunit 334 can suppress an increase in unnecessary processing time in anadaptive offset process.

The category determination unit 334 obtains from the buffer 331 thepixel value of the focused pixel (deblocked pixel value) and the pixelvalues of available pixels (e.g., the focused pixel) (deblocked pixelvalues) specified by the neighboring pixel specification information.The category determination unit 334 determines a category using thosepixel values. The category determination unit 334 supplies categoryspecification information indicating the determined category, togetherwith the focused pixel specification information supplied from thefocused pixel selection unit 333, to the offset value calculation unit335.

The offset value calculation unit 335 calculates an offset value for thecategory specified by the supplied category specification information.For example, offset values may be preset for the respective categories,or offset value calculation methods may be preset for the respectivecategories. The offset value calculation unit 335 supplies thecalculated offset value, together with the focused pixel specificationinformation supplied from the category determination unit 334, to theoffset unit 336.

The offset unit 336 obtains from the buffer 331 the pixel value of thefocused pixel (deblocked pixel value) specified by the supplied focusedpixel specification information. The offset unit 336 performs an offsetprocess on the focused pixel value using the supplied offset value, andthereby generates an offset pixel value. The offset unit 336 alsoobtains a quad-tree structure from the buffer 331. The offset unit 336supplies the generated offset pixel value together with the offset valuesupplied from the offset value calculation unit 335 and the quad-treestructure obtained from the buffer 331, to the cost function calculationunit 337.

The focused pixel selection unit 333 to the offset unit 336 repeat theabove-described processes for all pixels in the focused region (or allof some predetermined pixels) to determine offset pixel values for allpixels in the focused region. The offset pixel values together with theoffset values and the quad-tree structure are supplied to the costfunction calculation unit 337.

The cost function calculation unit 337 calculates a cost function valuefor the focused region using the offset pixel values. The cost functioncalculation unit 337 supplies the calculated cost function valuetogether with the offset values and the quad-tree structure which aresupplied from the offset unit 336, to the offset selection unit 324.

The pattern selection unit 332 to the cost function calculation unit 337repeat the above-described processes for all kinds (types) of edgeoffset modes, and supply cost function values for the respective modes(respective types) to the offset selection unit 324.

In addition, in the case of the example of FIG. 24, the neighboringpixel value control unit 302 has the neighboring pixel availabilitydetermination unit 341 and the neighboring pixel value determinationunit 342.

The neighboring pixel availability determination unit 341 obtainsaddress information about a focused LCU, slice boundaries, etc., fromthe lossless coding unit 106 and obtains pattern specificationinformation from the pattern selection unit 332 and focused pixelspecification information from the focused pixel selection unit 333. Theneighboring pixel availability determination unit 341 grasps theposition of a focused pixel from the focused pixel specificationinformation and further grasps the positions of neighboring pixels ofthe focused pixel from the pattern specification information. Theneighboring pixel availability determination unit 341 compares thepositions of the neighboring pixels with the slice boundaries, etc.,indicated by the address information to determine, based on thecomparison results whether the neighboring pixels are available. Theneighboring pixel availability determination unit 341 supplies thedetermination results to the neighboring pixel value determination unit342.

The neighboring pixel value determination unit 342 determinesneighboring pixels based on the determination results supplied from theneighboring pixel availability determination unit 341. For example, whenthe determination result shows that a neighboring pixel identified bypattern specification information is available, the neighboring pixelvalue determination unit 342 determines the neighboring pixel identifiedby the pattern specification information, as a neighboring pixel.Alternatively, for example, when the determination result shows that aneighboring pixel identified by pattern specification information isunavailable, the neighboring pixel value determination unit 342determines an available pixel (e.g., a focused pixel) as a neighboringpixel. The value used instead of the unavailable pixel value may be anyvalue, as described above. For example, the value may be other than apixel value, e.g., a fixed value, an arithmetic expression, etc. In thatcase, the neighboring pixel value determination unit 342 may specifythose pieces of information (a fixed value, an arithmetic expression,etc.) instead of specifying a pixel. The neighboring pixel valuedetermination unit 342 generates neighboring pixel specificationinformation indicating the neighboring pixels determined thereby (orinformation corresponding thereto) and supplies the neighboring pixelspecification information to the category determination unit 334.

By controlling neighboring pixels in this manner, the neighboring pixelvalue control unit 302 can always make neighboring pixel values to beavailable values. Therefore, the edge offset computing unit 323 cansuppress an increase in unnecessary processing time.

Although the above describes the case in which the edge offset computingunit 323 utilizes neighboring pixels specified by the neighboring pixelvalue control unit 302, the adaptive offset unit 301 can also have amode, other than edge offset, in which the process for a focused pixelis performed by referring to neighboring pixel values. In that case, aprocessing unit for that mode in the edge offset computing unit 323 mayutilize neighboring pixels specified by the neighboring pixel valuecontrol unit 302, as in the case of the edge offset computing unit 323shown in FIG. 24.

As described above, the image coding apparatus 300 can secure theindependence of slice-by-slice processes in an adaptive offset processand inhibit an increase in unnecessary processing time.

[Flow of a Coding Process]

Next, the flow of processes performed by the image coding apparatus 300such as that described above will be described. First, with reference toa flowchart of FIG. 25, an example of the flow of a coding process willbe described. Note that the processes at the respective steps shown inFIG. 25 are performed in their respective processing units. Therefore,the processing units of the respective processes are not necessarilyequal to one another. Thus, although each data is processed by aprocedure such as that described below, in practice the processing orderof the processes at the respective steps is not always the one such asthat described below.

The processes at steps S301 to S312 are performed in the same manner asin the case of the processes at steps S101 to S112 in FIG. 12.

When a deblocking filter process is performed, at step S313, theadaptive offset unit 301 performs an adaptive offset process.

The processes at steps S315 to S318 are performed in the same manner asin the case of the processes at steps S114 to S117 in FIG. 12. When theprocess at step S318 is completed, the coding process ends.

[Flow of an Adaptive Offset Process]

Next, with reference to a flowchart of FIG. 26, an example of the flowof the adaptive offset process performed at step S313 in FIG. 25 will bedescribed. Note that the adaptive offset process is performed on a perspecified partial region (e.g., an LCU) basis, the partial regions beingobtained by dividing a slice. In the following, the adaptive offsetprocess is performed on an LCU-by-LCU basis.

When the adaptive offset process starts, the quad-tree structuredetermination unit 311 determines, at step S331, a quad-tree structureof a focused LCU which is a processing target.

At step S332, the focused region selection unit 312 selects one of theregions of the quad-tree structure in the LCU in a specified order, as afocused region serving as a processing target.

At step S333, the no-offset computing unit 321 determines an offsetvalue in no-offset mode, performs an offset process using the offsetvalue, and calculates a cost function value.

At step S334, the band offset computing unit 322 determines an offsetvalue in band offset mode, performs an offset process using the offsetvalue, and calculates a cost function value. Note that in the exampledescribed above there are two kinds (two types) of band offset modes.Therefore, the band offset computing unit 322 calculates a cost functionvalue for each of the two kinds of modes (two types).

At step S335, the edge offset computing unit 323 determines an offsetvalue in edge offset mode, performs an offset process using the offsetvalue, and calculates a cost function value. A detail of this processwill be described later. Note that in the example described above thereare six kinds (six types) of edge offset modes. Therefore, the edgeoffset computing unit 323 calculates a cost function value for each ofthe six kinds of modes (six types).

The offset calculation unit 313 calculates cost function values in eachmode in this manner. Namely, when the offset calculation unit 313supports any other mode, the processes for that mode are added to theprocesses at steps S333 to S335.

When cost function values are calculated in all modes, at step S336, theoffset selection unit 324 selects a mode (offset type) with the smallestcost function value.

At step S337, the offset selection unit 324 transmits to the decodingside the quad-tree structure which is information indicating thequad-tree structure of the focused LCU determined at step S331, andselection information which is information indicating the selectionresult obtained at step S336 (also including information about theselected offset type).

At step S338, the offset unit 314 performs an offset process on adeblocking pixel value in the focused region, using the offset value ofthe offset type selected at step S336. At step S339, the pixel buffer315 stores the offset-processed pixel value obtained in the process atstep S338.

At step S340, the focused region selection unit 312 determines whetherall regions (CUs) in the focused LCU have been processed. If it isdetermined that there is an unprocessed region, then the focused regionselection unit 312 puts the process back to step S332 and repeats thesubsequent processes. Alternatively, if it is determined at step S340that there is no unprocessed region, then the focused region selectionunit 312 ends the adaptive offset process and puts the process back toFIG. 25.

[Flow of an Edge Offset Process]

Next, with reference to a flowchart of FIG. 27, an example of the flowof the edge offset process performed at step S335 in FIG. 26 will bedescribed.

When the edge offset process starts, the buffer 331 stores, at stepS361, deblocked pixel values. At step S362, the pattern selection unit332 selects a pattern serving as a processing target. At step S363, thefocused pixel selection unit 333 selects a focused pixel from amongpixels in a focused region.

At step S364, the neighboring pixel availability determination unit 341obtains various types of address information about regions near thefocused pixel. At step S365, the neighboring pixel availabilitydetermination unit 341 determines, based on the information obtained atstep S364, whether neighboring pixels of the focused pixel selected atstep S363 in the pattern specified at step S362 are available.

If it is determined that the neighboring pixels are not available, thenthe neighboring pixel availability determination unit 341 advances theprocess to step S366. At step S366, the neighboring pixel valuedetermination unit 342 specifies a focused pixel value as a neighboringpixel value. When the process at step S366 is completed, the neighboringpixel value determination unit 342 advances the process to step S368.

Alternatively, if it is determined at step S365 that the neighboringpixels are available, then the neighboring pixel availabilitydetermination unit 341 advances the process to step S367. At step S367,the neighboring pixel value determination unit 342 specifies the pixelvalues of the available neighboring pixels as neighboring pixel values.When the process at step S367 is completed, the neighboring pixel valuedetermination unit 342 advances the process to step S368.

At step S368, the category determination unit 334 determines a categorybased on the focused pixel value and the neighboring pixel valuesdetermined at step S366 or step S367.

At step S369, the offset value calculation unit 335 determines(including calculation and selection) an offset value for the categorydetermined at step S368. At step S370, the offset unit 336 performs anoffset process on the focused pixel value using the offset valuedetermined at step S369.

At step S371, the focused pixel selection unit 333 determines whetherall pixels have been processed. If it is determined that there is anunprocessed pixel in the focused region, then the focused pixelselection unit 333 puts the process back to step S363 and repeats thesubsequent processes.

Alternatively, if it is determine at step S371 that all pixels in thefocused region have been processed, then the focused pixel selectionunit 333 advances the process to step S372.

At step S372, the cost function calculation unit 337 calculates a costfunction value using the offset pixel values in the focused region. Atstep S373, the pattern selection unit 332 determines whether allneighboring pixel patterns prepared in advance (e.g., FIGS. 20A, 20B,20C, 20D, 20E, and 20F) have been processed (all types have beenprocessed). If it is determined that there is an unprocessed pattern,then the pattern selection unit 332 puts the process back to step S362and repeats the subsequent processes. Alternatively, if it is determinedat step S373 that all patterns have been processed, then the patternselection unit 332 ends the edge offset process and puts the processback to FIG. 26.

By performing each process in the above-described manner, an adaptiveoffset process can always be performed using available neighboringpixels. Thus, the image coding apparatus 300 can secure the independenceof slice-by-slice processes in an adaptive offset process and inhibit anincrease in unnecessary processing time.

4. FOURTH EMBODIMENT [Image Decoding Apparatus]

FIG. 28 is a block diagram showing an exemplary main configuration of animage decoding apparatus. An image decoding apparatus 400 shown in FIG.28 decodes coded data generated by the image coding apparatus 300, by adecoding method associated with the coding method.

Therefore, as shown in FIG. 28, the image decoding apparatus 400 isbasically the same apparatus as the image decoding apparatus 200 of FIG.15, and basically has the same configuration and performs the sameprocesses. Note, however, that as shown in FIG. 28 the image decodingapparatus 400 has an adaptive offset unit 401 in addition to theconfiguration of the image decoding apparatus 200. In addition, a filtercoefficient control unit 221 is omitted (may be provided).

A deblocking filter 206 supplies filter-processed decoded image data tothe adaptive offset unit 401.

The adaptive offset unit 401 performs an adaptive offset process whichis basically the same as in the case of the adaptive offset unit 301, onthe decoded image having been subjected to the deblocking filterprocess. Note, however, that the adaptive offset unit 401 performs anoffset process using a quad-tree structure and selection information(PQAOinfo) which are decoded and extracted by a lossless decoding unit202.

Those pieces of information are supplied from the coding side (imagecoding apparatus 300). Namely, the adaptive offset unit 401 processes afocused LCU using the same quad-tree structure as that used by theadaptive offset unit 301. In addition, the adaptive offset unit 401performs an offset process using the same mode (offset type, i.e., anoffset value) as that used by the adaptive offset unit 301. That is, theadaptive offset unit 401 performs an offset process by a methodappropriate to the adaptive offset unit 301. The adaptive offset unit401 supplies the offset-processed decoded image to an adaptive loopfilter 207.

The adaptive loop filter 207 performs, using the Wiener Filter, a loopfilter process (class classification ALF) on the offset-processeddecoded image, and thereby improves image quality.

[Adaptive Offset Unit]

FIG. 29 is a block diagram showing an exemplary main configuration ofthe adaptive offset unit 401. As shown in FIG. 29, the adaptive offsetunit 401 has a quad-tree structure buffer 411, a selection informationbuffer 412, an offset unit 413, and a pixel buffer 414.

The quad-tree structure buffer 411 obtains and stores a quad-treestructure supplied from the lossless decoding unit 202 (e.g., aquad-tree structure supplied from an apparatus on the coding side,included in a bit stream). The quad-tree structure buffer 411 suppliesthe quad-tree structure stored therein to the offset unit 413 atspecified timing or according to a request from an external source.

The selection information buffer 412 obtains and stores selectioninformation (PQAOinfo) supplied from the lossless decoding unit 202(e.g., selection information (PQAOinfo) supplied from an apparatus onthe coding side, included in a bit stream). The selection informationbuffer 412 supplies the selection information (PQAOinfo) stored thereinto the offset unit 413 at specified timing or according to a requestfrom an external source.

The offset unit 413 performs an offset process on a deblocked pixelvalue in a focused LCU supplied from the deblocking filter 206, usingthe quad-tree structure supplied from the quad-tree structure buffer 411and the selection information (PQAOinfo) supplied from the selectioninformation buffer 412. Specifically, the offset unit 413 performs anoffset process on the focused LCU on a per region (CU) basis, using anoffset type and an offset value which are identified by the selectioninformation (PQAOinfo) and according to the quad-tree structure. Theoffset unit 413 supplies the offset-processed pixel value to the pixelbuffer 414 to store the pixel value.

The pixel buffer 414 stores the offset-processed pixel value suppliedfrom the offset unit 413, and supplies the offset-processed pixel valuestored therein to the adaptive loop filter 207 at specified timing oraccording to a request from an external source.

Therefore, the adaptive offset unit 401 can perform an adaptive offsetprocess by a method appropriate to the adaptive offset unit 301 of theimage coding apparatus 300. Thus, the adaptive offset unit 401 canperform an adaptive offset process independently on a slice-by-slicebasis. Accordingly, the image decoding apparatus 400 can secure theindependence of slice-by-slice processes in an adaptive offset processand inhibit an increase in unnecessary processing time.

[Flow of a Decoding Process]

Next, with reference to a flowchart of FIG. 30, an example of the flowof a decoding process performed by the image decoding apparatus 400 suchas that described above will be described.

When the decoding process starts, the processes at steps S401 to S408are performed in the same manner as the processes at steps S201 to S208in FIG. 17. At step S409, the adaptive offset unit 401 performs anadaptive offset process. A detail of this process will be describedlater. The processes at steps S410 to S413 are performed in the samemanner as the processes at steps S209 to S212 in FIG. 17.

[Flow of an Adaptive Offset Process]

Next, with reference to a flowchart of FIG. 31, an example of the flowof the adaptive offset process performed at step S409 in FIG. 30 will bedescribed.

When the adaptive offset process starts, at step S431, the quad-treestructure buffer 411 stores a quad-tree structure. At step S432, theselection information buffer 412 stores selection information.

At step S433, the offset unit 413 selects, based on the quad-treestructure, a focused region from a focused LCU. At step S434, the offsetunit 413 performs an offset process on a deblocked pixel value in thefocused region, using an offset value identified by the selectioninformation.

At step S435, the pixel buffer 414 stores the offset-processed pixelvalue obtained in the process at step S434.

At step S436, the offset unit 413 determines whether all regions (CUs)in the focused LCU have been processed. If it is determined that thereis an unprocessed region, then the offset unit 413 puts the process backto step S433 and repeats the subsequent processes.

Alternatively, if it is determined at step S436 that all regions havebeen processed, then the offset unit 413 ends the adaptive offsetprocess and puts the process back to FIG. 30.

By performing each process in the above-described manner, the imagedecoding apparatus 400 can secure the independence of slice-by-sliceprocesses in an adaptive offset process and inhibit an increase inunnecessary processing time.

OTHER EXAMPLES

Note that although the above describes the case in which a neighboringpixel is unavailable due to the positional factor, the reason that aneighboring pixel is unavailable may be any reason, and is not limitedto the positional factor. Namely, if a neighboring pixel is unavailablefor other reasons, then a neighboring pixel value may be present in afocused slice.

In addition, an adaptive offset process for a focused pixel whoseneighboring pixel is not included in a focused slice may be omitted. Inthat case, both of the image coding apparatus 300 and the image decodingapparatus 400 omit adaptive offset processes for the focused pixel whoseneighboring pixel is not included in the focused slice.

In addition, the patterns of neighboring pixels may be any pattern andare not limited to those in the example of FIGS. 20A, 20B, 20C, 20D,20E, and 20F. Therefore, the positions and number of neighboring pixelsmay be any position and any number.

In addition, the image coding apparatus 300 (e.g., the adaptive offsetunit 301) may generate, for each slice, a flag that controls whether toperform an adaptive offset process independently on a slice-by-slicebasis, and transmit the flags to the image decoding apparatus 400.

In a slice set with this flag (e.g., the value is 1), the adaptiveoffset unit 301 performs, as described above, an adaptive offset processindependently on a slice-by-slice basis, using only information onavailable pixels. On the other hand, in a slice not set with the flag(e.g., the value is 0), even when a neighboring pixel belongs to anotherslice, the adaptive offset unit 301 performs an adaptive offset processafter the pixel values of all neighboring pixels have been obtained.

When the value of the flag supplied from the image coding apparatus 300is 1, the adaptive offset unit 401 of the image decoding apparatus 400performs an adaptive offset process such that the focused slice is madeindependent of other slices. When the value of the flag supplied fromthe image coding apparatus 300 is 0, the adaptive offset unit 401performs an adaptive offset process such that the focused slice is notmade independent of other slices.

Note that the present technique can be applied to an image codingapparatus and an image decoding apparatus which are used when receiving,for example, image information (bit stream) compressed by an orthogonaltransform such as a discrete cosine transform and motion compensation,like MPEG, H.26x, etc., via a network medium such as satellitebroadcasting, cable television, the Internet, or a mobile phone. Inaddition, the present technique can be applied to an image codingapparatus and an image decoding apparatus which are used when performinga process on storage media such as optical and magnetic disks and flashmemories. Furthermore, the present technique can also be applied to amotion prediction/compensation apparatus included in those image codingapparatuses and image decoding apparatuses, etc.

5. FIFTH EMBODIMENT [Personal Computer]

The above-described series of processes can be performed by hardware andcan be performed by software. When the series of processes are performedby software, a program that forms the software is installed on acomputer. Here, the computer includes a computer incorporated indedicated hardware, a general-purpose personal computer capable ofperforming various types of functions by installing various types ofprograms, etc.

In FIG. 32, a CPU (Central Processing Unit) 501 of a personal computer500 performs various types of processes according to a program stored ina ROM (Read Only Memory) 502 or a program loaded into a RAM (RandomAccess Memory) 503 from a storage unit 513. In the RAM 503 are alsostored, where appropriate, data required when the CPU 501 performsvarious types of processes, etc.

The CPU 501, the ROM 502, and the RAM 503 are connected to each othervia a bus 504. An input/output interface 510 is also connected to thebus 504.

To the input/output interface 510 are connected an input unit 511including a keyboard, a mouse, etc., an output unit 512 including adisplay including a CRT (Cathode Ray Tube) or an LCD (Liquid CrystalDisplay), a speaker, and the like, the storage unit 513 composed of ahard disk, etc., and a communication unit 514 composed of a modem, etc.The communication unit 514 performs a communication process through anetwork including the Internet.

To the input/output interface 510 is also connected a drive 515 ifnecessary, and a removable medium 521 such as a magnetic disk, anoptical disk, a magneto-optical disk, or a semiconductor memory isplaced where appropriate, and a computer program read therefrom isinstalled on the storage unit 513 if necessary.

When the above-described series of processes are performed by software,a program that forms the software is installed from a network or arecording medium.

As shown in FIG. 32, for example, the recording medium is not onlycomposed of the removable medium 521, including a magnetic disk(including a flexible disk), an optical disk (including a CD-ROM(Compact Disc-Read Only Memory) and a DVD (Digital Versatile Disc)), amagneto-optical disk (including an MD (Mini Disc)), or a semiconductormemory, which is distributed separately from the main body of theapparatus to distribute the program to the user and which has theprogram recorded therein, but is also composed of the ROM 502, the harddisk included in the storage unit 513, or the like, which has recordedtherein the program distributed to the user in a state of beingincorporated in advance in the main body of the apparatus.

Note that the program executed by the computer may be a program thatperforms processes chronologically in the order described in the presentspecification, or may be a program that performs processes in parallelor at required timing such as when the program is called.

In addition, in the present specification, steps that describe theprogram recorded in the recording medium not only include processesperformed chronologically in the described order, but also includeprocesses that are not necessarily processed chronologically but areperformed parallely or individually.

In addition, in the present specification, a system represents the wholeapparatus composed of a plurality of devices (apparatuses).

In addition, a configuration described above as a single apparatus (or aprocessing unit) may be divided to be configured as a plurality ofapparatuses (or processing units). In the other way around,configurations described above as a plurality of apparatuses (orprocessing units) may be put together to be configured as a singleapparatus (or a processing unit). In addition, it is of course possibleto add other configurations than those described above to theconfiguration of each apparatus (or each processing unit). Furthermore,as long as the configuration and operation of the system as a whole aresubstantially the same, a part of the configuration of a given apparatus(or a processing unit) may be included in the configuration of anotherapparatus (or another processing unit). That is, the present techniqueis not limited to the above-described embodiments, and various changesmay be made thereto without departing from the spirit and scope of thepresent technique.

Imaging coding apparatuses and image decoding apparatuses according tothe above-described embodiments can be applied to various electronicdevices such as transmitters or receivers for satellite broadcasting,cable broadcasting such as cable TV, distribution on the Internet,distribution to terminals by cellular communication, and the like,recording apparatuses that record images in media such as optical disks,magnetic disks, and flash memories, or reproducing apparatuses thatreproduce images from those storage media. Four application exampleswill be described below.

6. SIXTH EMBODIMENT First Application Example: Television Receiver

FIG. 33 shows an example of a schematic configuration of a televisionapparatus to which the above-described embodiments are applied. Atelevision apparatus 900 includes an antenna 901, a tuner 902, ademultiplexer 903, a decoder 904, a video signal processing unit 905, adisplay unit 906, an audio signal processing unit 907, a speaker 908, anexternal interface 909, a control unit 910, a user interface 911, and abus 912.

The tuner 902 extracts a signal of a desired channel from a broadcastsignal received through the antenna 901, and demodulates the extractedsignal. Then, the tuner 902 outputs a coded bit stream obtained by thedemodulation to the demultiplexer 903. Namely, the tuner 902 acts as atransmission unit of the television apparatus 900 that receives a codedstream where images are coded.

The demultiplexer 903 demultiplexes a video stream and an audio streamof a program to be viewed from the coded bit stream, and outputs thedemultiplexed streams to the decoder 904. In addition, the demultiplexer903 extracts auxiliary data such as an EPG (Electronic Program Guide)from the coded bit stream, and supplies the extracted data to thecontrol unit 910. Note that when the coded bit stream is scrambled, thedemultiplexer 903 may perform descrambling.

The decoder 904 decodes the video stream and the audio stream which areinputted from the demultiplexer 903. Then, the decoder 904 outputs videodata generated in the decoding process to the video signal processingunit 905. In addition, the decoder 904 outputs audio data generated inthe decoding process to the audio signal processing unit 907.

The video signal processing unit 905 reproduces the video data inputtedfrom the decoder 904, and allows the display unit 906 to display video.In addition, the video signal processing unit 905 may allow the displayunit 906 to display an application screen supplied through a network. Inaddition, the video signal processing unit 905 may perform an additionalprocess, e.g., noise removal, on the video data, according to thesettings. Furthermore, the video signal processing unit 905 may createGUI (Graphical User Interface) images, e.g., a menu, buttons, or acursor, and superimpose the created images on an output image.

The display unit 906 is driven by a drive signal supplied from the videosignal processing unit 905, to display video or an image on a videoplane of a display device (e.g., a liquid crystal display, a plasmadisplay, an OELD (Organic ElectroLuminescence Display), or the like).

The audio signal processing unit 907 performs a reproduction process,such as D/A conversion and amplification, on the audio data inputtedfrom the decoder 904 and allows the speaker 908 to output audio. Inaddition, the audio signal processing unit 907 may perform an additionalprocess, such as noise removal, on the audio data.

The external interface 909 is an interface for connecting the televisionapparatus 900 to an external device or a network. For example, a videostream or an audio stream received through the external interface 909may be decoded by the decoder 904. Namely, the external interface 909also acts as a transmission unit of the television apparatus 900 thatreceives a coded stream where images are coded.

The control unit 910 has a processor such as a CPU and memories such asa RAM and a ROM. The memories store programs to be executed by the CPU,program data, EPG data, data obtained through a network, and the like.The programs stored in the memories are, for example, read and executedby the CPU upon startup of the television apparatus 900. The CPUexecutes the programs and thereby, for example, controls the operationof the television apparatus 900 according to an operation signalinputted from the user interface 911.

The user interface 911 is connected to the control unit 910. The userinterface 911 has, for example, buttons and switches used by the user tooperate the television apparatus 900, a remote control signal receptionunit, and the like. The user interface 911 detects, through thosecomponents, operation performed by the user, to generate an operationsignal and outputs the generated operation signal to the control unit910.

The bus 912 interconnects the tuner 902, the demultiplexer 903, thedecoder 904, the video signal processing unit 905, the audio signalprocessing unit 907, the external interface 909, and the control unit910.

In the television apparatus 900 configured in this manner, the decoder904 has the function of image decoding apparatuses according to theabove-described embodiments. By that, upon decoding an image on thetelevision apparatus 900, parallelization of slice-by-slice processescan be implemented, enabling to suppress an increase in processing timecaused by the occurrence of unwanted delay time in an adaptive loopfilter process.

7. SEVENTH EMBODIMENT Second Application Example: Mobile Phone

FIG. 34 shows an example of a schematic configuration of a mobile phoneto which the above-described embodiments are applied. A mobile phone 920includes an antenna 921, a communication unit 922, an audio codec 923, aspeaker 924, a microphone 925, a camera unit 926, an image processingunit 927, a multiplexing/demultiplexing unit 928, arecording/reproducing unit 929, a display unit 930, a control unit 931,an operation unit 932, and a bus 933.

The antenna 921 is connected to the communication unit 922. The speaker924 and the microphone 925 are connected to the audio codec 923. Theoperation unit 932 is connected to the control unit 931. The bus 933interconnects the communication unit 922, the audio codec 923, thecamera unit 926, the image processing unit 927, themultiplexing/demultiplexing unit 928, the recording/reproducing unit929, the display unit 930, and the control unit 931.

The mobile phone 920 performs operation, such as transmission andreception of audio signals, transmission and reception of emails orimage data, imaging of images, and recording of data, in variousoperating modes including voice call mode, data communication mode,shooting mode, and videophone mode.

In voice call mode, an analog audio signal generated by the microphone925 is supplied to the audio codec 923. The audio codec 923 converts theanalog audio signal into audio data and A/D converts and compresses theconverted audio data. Then, the audio codec 923 outputs the compressedaudio data to the communication unit 922. The communication unit 922codes and modulates the audio data and thereby generates a transmitsignal. Then, the communication unit 922 transmits the generatedtransmit signal to a base station (not shown) through the antenna 921.In addition, the communication unit 922 amplifies and frequency-convertsa radio signal received through the antenna 921 and thereby obtains areceive signal. Then, the communication unit 922 demodulates and decodesthe receive signal and thereby generates audio data, and outputs thegenerated audio data to the audio codec 923. The audio codec 923decompresses and D/A converts the audio data and thereby generates ananalog audio signal. Then, the audio codec 923 supplies the generatedaudio signal to the speaker 924 to output audio.

In addition, in data communication mode, for example, the control unit931 generates text data composing an email, according to operationperformed by the user through the operation unit 932. In addition, thecontrol unit 931 allows the display unit 930 to display text. Inaddition, the control unit 931 generates email data according to atransmission instruction from the user through the operation unit 932,and outputs the generated email data to the communication unit 922. Thecommunication unit 922 codes and modulates the email data and therebygenerates a transmit signal. Then, the communication unit 922 transmitsthe generated transmit signal to a base station (not shown) through theantenna 921. In addition, the communication unit 922 amplifies andfrequency-converts a radio signal received through the antenna 921 andthereby obtains a receive signal. Then, the communication unit 922demodulates and decodes the receive signal and thereby reconstructsemail data, and outputs the reconstructed email data to the control unit931. The control unit 931 allows the display unit 930 to display thecontent of the email and allows a storage medium in therecording/reproducing unit 929 to store the email data.

The recording/reproducing unit 929 has any readable and writable storagemedium. For example, the storage medium may be a built-in type storagemedium such as a RAM or a flash memory, or an external placement-typestorage medium such as a hard disk, a magnetic disk, a magneto-opticaldisk, an optical disk, a USB (Unallocated Space Bitmap) memory, or amemory card.

In addition, in shooting mode, for example, the camera unit 926 images asubject and thereby generates image data, and outputs the generatedimage data to the image processing unit 927. The image processing unit927 codes the image data inputted from the camera unit 926 and allowsthe storage medium in the storing/reproducing unit 929 to store a codedstream.

In addition, in videophone mode, for example, themultiplexing/demultiplexing unit 928 multiplexes a video stream coded bythe image processing unit 927 and an audio stream inputted from theaudio codec 923, and outputs the multiplexed streams to thecommunication unit 922. The communication unit 922 codes and modulatesthe streams and thereby generates a transmit signal. Then, thecommunication unit 922 transmits the generated transmit signal to a basestation (not shown) through the antenna 921. In addition, thecommunication unit 922 amplifies and frequency-converts a radio signalreceived through the antenna 921 and thereby obtains a receive signal.The transmit signal and the receive signal can include coded bitstreams. Then, the communication unit 922 demodulates and decodes thereceive signal and thereby reconstructs a stream, and outputs thereconstructed stream to the multiplexing/demultiplexing unit 928. Themultiplexing/demultiplexing unit 928 demultiplexes a video stream and anaudio stream from the inputted stream, and outputs the video stream tothe image processing unit 927 and the audio stream to the audio codec923. The image processing unit 927 decodes the video stream and therebygenerates video data. The video data is supplied to the display unit930, and a series of images are displayed on the display unit 930. Theaudio codec 923 decompresses and D/A converts the audio stream andthereby generates an analog audio signal. Then, the audio codec 923supplies the generated audio signal to the speaker 924 to output audio.

In the mobile phone 920 configured in this manner, the image processingunit 927 has the functions of image coding apparatuses and imagedecoding apparatuses according to the above-described embodiments. Bythat, upon coding and decoding an image on the mobile phone 920,parallelization of slice-by-slice processes can be implemented, enablingto suppress an increase in processing time caused by the occurrence ofunwanted delay time in an adaptive loop filter process.

8. EIGHTH EMBODIMENT Third Application Example: Recording/ReproducingApparatus

FIG. 35 shows an example of a schematic configuration of arecording/reproducing apparatus to which the above-described embodimentsare applied. A recording/reproducing apparatus 940, for example, codesthe audio data and video data of a received broadcast program andrecords the coded data in a recording medium. In addition, therecording/reproducing apparatus 940 may, for example, code audio dataand video data obtained from another apparatus and record the coded datain a recording medium. In addition, the recording/reproducing apparatus940, for example, reproduces the data recorded in the recording mediumon a monitor and a speaker, according to a user instruction. At thistime, the recording/reproducing apparatus 940 decodes the audio data andthe video data.

The recording/reproducing apparatus 940 includes a tuner 941, anexternal interface 942, an encoder 943, an HDD (Hard Disk Drive) 944, adisc drive 945, a selector 946, a decoder 947, an OSD (On-ScreenDisplay) 948, a control unit 949, and a user interface 950.

The tuner 941 extracts a signal of a desired channel from a broadcastsignal received through an antenna (not shown), and demodulates theextracted signal. Then, the tuner 941 outputs a coded bit streamobtained by the demodulation, to the selector 946. Namely, the tuner 941acts as a transmission unit of the recording/reproducing apparatus 940.

The external interface 942 is an interface for connecting therecording/reproducing apparatus 940 to an external device or a network.The external interface 942 may be, for example, an IEEE 1394 interface,a network interface, a USB interface, a flash memory interface, or thelike. For example, video data and audio data which are received throughthe external interface 942 are inputted to the encoder 943. Namely, theexternal interface 942 acts as a transmission unit of therecording/reproducing apparatus 940.

When the video data and audio data inputted from the external interface942 are not coded, the encoder 943 codes the video data and the audiodata. Then, the encoder 943 outputs a coded bit stream to the selector946.

The HDD 944 records a coded bit stream where content data such as videoand audio is compressed, various types of programs, and other data on ahard disk provided therein. In addition, upon reproducing video andaudio, the HDD 944 reads data thereof from the hard disk.

The disc drive 945 performs recording and reading of data on a recordingmedium placed therein. A recording medium placed in the disc drive 945may be, for example, a DVD disc (DVD-Video, DVD-RAM, DVD-R, DVD-RW,DVD+R, DVD+RW, etc.) or a Blu-ray (registered trademark) disc.

When video and audio are recorded, the selector 946 selects a coded bitstream inputted from the tuner 941 or the encoder 943, and outputs theselected coded bit stream to the HDD 944 or the disc drive 945. Inaddition, when video and audio are reproduced, the selector 946 outputsa coded bit stream inputted from the HDD 944 or the disc drive 945, tothe decoder 947.

The decoder 947 decodes the coded bit stream and thereby generates videodata and audio data. Then, the decoder 947 outputs the generated videodata to the OSD 948. In addition, the decoder 904 outputs the generatedaudio data to an external speaker.

The OSD 948 reproduces the video data inputted from the decoder 947 anddisplays video. In addition, the OSD 948 may superimpose GUI images,e.g., a menu, buttons, or a cursor, on the displayed video.

The control unit 949 has a processor such as a CPU and memories such asa RAM and a ROM. The memories store programs to be executed by the CPU,program data, and the like. The programs stored in the memories are, forexample, read and executed by the CPU upon startup of therecording/reproducing apparatus 940. The CPU executes the programs andthereby, for example, controls the operation of therecording/reproducing apparatus 940 according to an operation signalinputted from the user interface 950.

The user interface 950 is connected to the control unit 949. The userinterface 950 has, for example, buttons and switches used by the user tooperate the recording/reproducing apparatus 940, a remote control signalreception unit, and the like. The user interface 950 detects, throughthose components, operation performed by the user, to generate anoperation signal and outputs the generated operation signal to thecontrol unit 949.

In the recording/reproducing apparatus 940 configured in this manner,the encoder 943 has the function of image coding apparatuses accordingto the above-described embodiments. In addition, the decoder 947 has thefunction of image decoding apparatuses according to the above-describedembodiments. By that, upon coding and decoding an image on therecording/reproducing apparatus 940, parallelization of slice-by-sliceprocesses can be implemented, enabling to suppress an increase inprocessing time caused by the occurrence of unwanted delay time in anadaptive loop filter process.

9. NINTH EMBODIMENT Fourth Application Example: Imaging Apparatus

FIG. 36 shows an example of a schematic configuration of an imagingapparatus to which the above-described embodiments are applied. Animaging apparatus 960 images a subject and thereby creates an image,codes image data, and records the coded image data in a recordingmedium.

The imaging apparatus 960 includes an optical block 961, an imaging unit962, a signal processing unit 963, an image processing unit 964, adisplay unit 965, an external interface 966, a memory 967, a media drive968, an OSD 969, a control unit 970, a user interface 971, and a bus972.

The optical block 961 is connected to the imaging unit 962. The imagingunit 962 is connected to the signal processing unit 963. The displayunit 965 is connected to the image processing unit 964. The userinterface 971 is connected to the control unit 970. The bus 972interconnects the image processing unit 964, the external interface 966,the memory 967, the media drive 968, the OSD 969, and the control unit970.

The optical block 961 has a focus lens, a diaphragm mechanism, and thelike. The optical block 961 forms an optical image of a subject onto animaging plane of the imaging unit 962. The imaging unit 962 has an imagesensor such as a CCD (Charge Coupled Device) or a CMOS (ComplementaryMetal Oxide Semiconductor), and converts, by photoelectric conversion,the optical image formed on the imaging plane into an image signalserving as an electrical signal. Then, the imaging unit 962 outputs theimage signal to the signal processing unit 963.

The signal processing unit 963 performs various camera signalprocessing, such as knee correction, gamma correction, and colorcorrection, on the image signal inputted from the imaging unit 962. Thesignal processing unit 963 outputs image data obtained after the camerasignal processing, to the image processing unit 964.

The image processing unit 964 codes the image data inputted from thesignal processing unit 963 and thereby generates coded data. Then, theimage processing unit 964 outputs the generated coded data to theexternal interface 966 or the media drive 968. In addition, the imageprocessing unit 964 decodes coded data inputted from the externalinterface 966 or the media drive 968 and thereby generates image data.Then, the image processing unit 964 outputs the generated image data tothe display unit 965. In addition, the image processing unit 964 mayoutput the image data inputted from the signal processing unit 963, tothe display unit 965 to display an image. In addition, the imageprocessing unit 964 may superimpose display data obtained from the OSD969, on an image outputted to the display unit 965.

The OSD 969 creates GUI images, e.g., a menu, buttons, or a cursor, andoutputs the created images to the image processing unit 964.

The external interface 966 is configured as, for example, a USBinput/output terminal. The external interface 966, for example, connectsthe imaging apparatus 960 to a printer when printing an image. Inaddition, a drive is connected to the external interface 966, ifnecessary. For example, a removable medium such as a magnetic disk or anoptical disk is placed in the drive, and a program read from theremovable medium can be installed on the imaging apparatus 960.Furthermore, the external interface 966 may be configured as a networkinterface which is connected to a network such as a LAN or the Internet.Namely, the external interface 966 acts as a transmission unit of theimaging apparatus 960.

A recording medium placed in the media drive 968 may be any readable andwritable removable medium, e.g., a magnetic disk, a magneto-opticaldisk, an optical disk, or a semiconductor memory. In addition, arecording medium may be fixedly placed in the media drive 968, by which,for example, a non-portable storage unit such as a built-in type harddisk drive or an SSD (Solid State Drive) may be formed.

The control unit 970 has a processor such as a CPU and memories such asa RAM and a ROM. The memories store programs to be executed by the CPU,program data, and the like. The programs stored in the memories are, forexample, read and executed by the CPU upon startup of the imagingapparatus 960. The CPU executes the programs and thereby, for example,controls the operation of the imaging apparatus 960 according to anoperation signal inputted from the user interface 971.

The user interface 971 is connected to the control unit 970. The userinterface 971 has, for example, buttons, switches, and the like, used bythe user to operate the imaging apparatus 960. The user interface 971detects, through those components, operation performed by the user, togenerate an operation signal and outputs the generated operation signalto the control unit 970.

In the imaging apparatus 960 configured in this manner, the imageprocessing unit 964 has the functions of image coding apparatuses andimage decoding apparatuses according to the above-described embodiments.By that, upon coding and decoding an image on the imaging apparatus 960,parallelization of slice-by-slice processes can be implemented, enablingto suppress an increase in processing time caused by the occurrence ofunwanted delay time in an adaptive loop filter process.

Note that in the present specification an example is described in whichvarious pieces of information such as an SPS, a PPS, and a slice headerare multiplexed to a header of a coded stream and are transmitted fromthe coding side to the decoding side. However, the technique fortransmitting those pieces of information is not limited to such anexample. For example, instead of multiplexing those pieces ofinformation to a coded bit stream, those pieces of information may betransmitted or recorded as separate data associated with the coded bitstream. The term “associated” as used herein means that an imageincluded in a bit stream (which may be a part of an image such as aslice or a block) and information associated with the image can belinked to each other upon decoding. Namely, the information may betransmitted through a different transmission path than that for theimage (or the bit stream). In addition, the information may be recordedin a different recording medium (or in a different recording area of thesame recording medium) than that for the image (or the bit stream).Furthermore, the information and the image (or the bit stream) may beassociated with each other in any unit, e.g., a plurality of frames, oneframe, or a part in a frame.

Although the preferred embodiments of the present disclosure have beendescribed in detail above with reference to the accompanying drawings,the present technique is not limited to such examples. It will beapparent that those having average knowledge in the technical field towhich the present disclosure belongs would reach various changes ormodifications within the scope of the technical idea described in theclaims. Thus, it will be understood that those changes and modificationsalso as a matter of course belong to the technical scope of the presentdisclosure.

Note that the present technique can also employ configurations such asthose shown below.

(1) An image processing apparatus including:

an information control unit that obtains information required for imageprocessing for a focused pixel, using only information belonging to aslice including the focused pixel, the focused pixel being a processingtarget, and the information being obtained using reference informationbelonging to a different pixel than the focused pixel; and an imageprocessing unit that performs the image processing using the informationobtained by the information control unit.

(2) The image processing apparatus according to (1), wherein

the image processing is an adaptive loop filter process,the information control unit determines, as the information required forthe image processing, a filter coefficient used in the adaptive loopfilter process, andthe image processing unit performs the adaptive loop filter process forthe focused pixel, using the filter coefficient determined by theinformation control unit.

(3) The image processing apparatus according to (2), wherein

the image processing unit performs the adaptive loop filter processindependently on a slice-by-slice basis, andthe information control unit determines the filter coefficient withoutusing information external to a focused slice being a processing target.

(4) The image processing apparatus according to (3), wherein theinformation control unit includes:

a position determination unit that determines whether a neighboringpixel of the focused pixel is located in the focused slice;a calculation unit that calculates information representing complexityof texture of the focused pixel, according to a result of thedetermination made by the position determination unit;a class classification unit that classifies the focused pixel into aclass, according to magnitude of the information representing complexityof texture calculated by the calculation unit; anda filter coefficient setting unit that sets a value according to theclass classified by the class classification unit, as the filtercoefficient for the focused pixel.

(5) The image processing apparatus according to (4), wherein theinformation representing complexity of texture is SML (Sum-ModifiedLaplacian).

(6) The image processing apparatus according to (4), wherein when it isdetermined by the position determination unit that the neighboring pixelis not located in the focused slice, the calculation unit sets apredetermined, specified, fixed value as a pixel value of theneighboring pixel, and calculates the information representingcomplexity of texture.

(7) The image processing apparatus according to (4), wherein when it isdetermined by the position determination unit that the neighboring pixelis not located in the focused slice, the calculation unit calculates theinformation representing complexity of texture, using a pixel value ofthe available pixel near the neighboring pixel instead of a pixel valueof the neighboring pixel.

(8) The image processing apparatus according to (4), wherein when it isdetermined by the position determination unit that the neighboring pixelis not located in the focused slice, the calculation unit calculates theinformation representing complexity of texture, using a pixel value ofthe focused pixel instead of a pixel value of the neighboring pixel.

(9) The image processing apparatus according to (4), wherein thecalculation unit calculates the information representing complexity oftexture using, as neighboring pixels, four pixels adjacent above, below,and to left and right of the focused pixel.

(10) The image processing apparatus according to (9), wherein thecalculation unit sets, as the information representing complexity oftexture, a sum total of absolute values of differences between a pixelvalue of the focused pixel and pixel values of the respectiveneighboring pixels.

(11) The image processing apparatus according to (4), wherein when it isdetermined by the position determination unit that the neighboring pixelis not located in the focused slice, the filter coefficient setting unitsets a predetermined, specified value as the filter coefficient for thefocused pixel.

(12) The image processing apparatus according to (4), wherein when it isdetermined by the position determination unit that the neighboring pixelis not located in the focused slice, the image processing unit omits theadaptive loop filter process for the focused pixel.

(13) The image processing apparatus according to any one of (2) to (12),further including a flag generation unit that generates a flagindicating whether to perform an adaptive loop filter process for thefocused slice independently of other slices, wherein the imageprocessing unit performs the adaptive loop filter process for thefocused pixel in the focused slice, according to a value of the flaggenerated by the flag generation unit.

(14) The image processing apparatus according to (1), wherein

the image processing is an adaptive offset process,the information control unit determines, as the information required forimage processing,a neighboring pixel value used in the adaptive offset process, andthe image processing unit performs the adaptive offset process for thefocused pixel,using the neighboring pixel value determined by the information controlunit.

(15) The image processing apparatus according to (14), wherein

the image processing unit performs the adaptive offset processindependently on a slice-by-slice basis, andthe information control unit determines the neighboring pixel valuewithout using information external to a focused slice being a processingtarget.

(16) The image processing apparatus according to (15), wherein

the information control unit includes:a position determination unit that determines whether a neighboringpixel of the focused pixel is located in the focused slice; anda neighboring pixel value determination unit that determines theneighboring pixel value, according to a result of the determination madeby the position determination unit.

(17) The image processing apparatus according to (16), wherein when itis determined by the position determination unit that the neighboringpixel is not located in the focused slice, the neighboring pixel valuedetermination unit determines a predetermined, specified, fixed value tobe the neighboring pixel value.

(18) The image processing apparatus according to (16), wherein when itis determined by the position determination unit that the neighboringpixel is not located in the focused slice, the neighboring pixel valuedetermination unit determines a pixel value of an available pixel nearthe neighboring pixel to be the neighboring pixel value.

(19) The image processing apparatus according to (16), wherein when itis determined by the position determination unit that the neighboringpixel is not located in the focused slice, the neighboring pixel valuedetermination unit determines a pixel value of the focused pixel to bethe neighboring pixel value.

(20) The image processing apparatus according to any one of (14) to(19), further including a flag generation unit that generates a flagindicating whether to perform an adaptive offset process for the focusedslice independently of other slices, wherein the image processing unitperforms the adaptive offset process for the focused pixel in thefocused slice, according to a value of the flag generated by the flaggeneration unit.

(21) An image processing method for an image processing apparatus, themethod including:

obtaining, by an information control unit, information required forimage processing for a focused pixel, using only information belongingto a slice including the focused pixel, the focused pixel being aprocessing target, and the information being obtained using referenceinformation belonging to a different pixel than the focused pixel; andperforming, by an image processing unit, the image processing using theinformation obtained by the information control unit.

REFERENCE SIGNS LIST

-   100 Image coding apparatus-   112 Adaptive loop filter-   121 Filter coefficient control unit-   131 Control unit-   132 Filter processing unit-   141 Position determination unit-   142 SML calculation unit-   143 Class classification unit-   144 Filter coefficient setting unit-   200 Image decoding apparatus-   207 Adaptive loop filter-   221 Filter coefficient control unit-   231 Control unit-   232 Filter processing unit-   241 Position determination unit-   242 SML calculation unit-   243 Class classification unit-   244 Filter coefficient setting unit-   300 Image coding apparatus-   301 Adaptive offset unit-   302 Neighboring pixel value control unit-   311 Quad-tree structure determination unit-   312 Focused region selection unit-   313 Offset calculation unit-   314 Offset unit-   315 Image buffer-   321 No-offset computing unit-   322 Band offset computing unit-   323 Edge offset computing unit-   324 Offset selection unit-   331 Buffer-   332 Pattern selection unit-   333 Focused pixel selection unit-   334 Category determination unit-   335 Offset value calculation unit-   336 Offset unit-   337 Cost function calculation unit-   341 Neighboring pixel availability determination unit-   342 Neighboring pixel value determination unit-   400 Image coding apparatus-   401 Adaptive offset unit-   411 Quad-tree structure buffer-   412 Selection information buffer-   413 Offset unit-   414 Pixel buffer

What is claimed is:
 1. An image decoding apparatus, comprising:circuitry configured to: generate a decoded image based on coded data;classify a focused pixel of the decoded image into a class using mountof change in pixel value of the focused pixel and a neighboring pixelbelonging to a processing unit divided from a picture to which thefocused pixel belongs; execute an adaptive loop filter process using afilter coefficient based on the classified class.
 2. The image decodingapparatus according to claim 1, wherein the processing unit divided fromthe picture is a slice.
 3. The image decoding apparatus according toclaim 1, wherein the circuitry is further configured to: execute adeblocking filter process to the decoded image; and classify the focusedpixel of the executed decoded image.
 4. The image decoding apparatusaccording to claim 1, wherein the circuitry is further configured to:receive the coded data; and generate the decoded image based on thereceived coded data.
 5. The image decoding apparatus according to claim1, wherein the coded data include a flag indicating whether to executethe adaptive loop filter process.
 6. An image decoding method,comprising: in an image decoding apparatus: generating a decoded imagebased on coded data; classifying a focused pixel of the decoded imageinto a class using mount of change in pixel value of the focused pixeland a neighboring pixel belonging to a processing unit divided from apicture to which the focused pixel belongs; executing an adaptive loopfilter process using a filter coefficient based on the class classified.7. The image decoding method according to claim 6, wherein theprocessing unit divided from the picture is a slice.
 8. The imagedecoding method according to claim 6, further comprising executing adeblocking filter process to the decoded image; and classifying thefocused pixel of the executed decoded image.
 9. The image decodingmethod according to claim 6, further comprising receiving the codeddata; and generating the decoded image based on the received coded data.10. The image decoding method according to claim 6, wherein the codeddata include a flag indicating whether to execute the adaptive loopfilter process.